1public class ReverseNumber {
2 public static void main(String[] args) {
3 int num = 1234, reversed = 0;
4
5 while(num != 0) {
6 int digit = num % 10;
7 reversed = reversed * 10 + digit;
8 num = num / 10;
9 }
10 System.out.println("Reversed Number: " + reversed);
11}}