Reversing a Number and a String using JAVA

The Java code is right here to reverse the stuffs. 
  1. import java.util.Scanner;  
  2. import java.io.BufferedReader;  
  3. import java.io.InputStreamReader;  
  4. public class Reverse {  
  5.     public static void main(String args[]) throws Exception {  
  6.         BufferedReader br = new BufferedReader(new InputStreamReader(System. in ));  
  7.         System.out.println("1-Want to reverse a number..?");  
  8.         System.out.println("2-Want to reverse a string..?");  
  9.         System.out.println();  
  10.         System.out.print("Select any option: ");  
  11.         int select = Integer.parseInt(br.readLine());  
  12.         switch (select) {  
  13.             case 1:  
  14.                 int n, reverse = 0;  
  15.                 System.out.print("Enter the number to reverse: ");  
  16.                 Scanner in = new Scanner(System. in );  
  17.                 n = in .nextInt();  
  18.                 while (n != 0) {  
  19.                     reverse = reverse * 10;  
  20.                     reverse = reverse + n % 10;  
  21.                     n = n / 10;  
  22.                 }  
  23.                 System.out.println("Reversed number is: " + reverse);  
  24.                 break;  
  25.             case 2:  
  26.                 String str, reverse1 = "";  
  27.                 Scanner input = new Scanner(System. in );  
  28.                 System.out.print("Enter a string to reverse: ");  
  29.                 str = input.nextLine();  
  30.                 int length = str.length();  
  31.                 for (int i = length - 1; i >= 0; i--)  
  32.                 reverse1 = reverse1 + str.charAt(i);  
  33.                 System.out.println("Reversed string is: " + reverse1);  
  34.                 break;  
  35.             default:  
  36.                 System.out.println("Wrong choice :(");  
  37.         }  
  38.     }  
  39. }  
Thank you, keep learning and sharing.