public class Reverse{
public static void reverse(int number){
if(number<10){
System.out.print(number);
}
else{
int num = number%10;
System.out.print(num);
reverse(number/10);
}
}
public static void main(String[] args){
reverse(123456789);
}
}
public static void reverse(int number){
if(number<10){
System.out.print(number);
}
else{
int num = number%10;
System.out.print(num);
reverse(number/10);
}
}
public static void main(String[] args){
reverse(123456789);
}
}