Scanner sc = new Scanner(System.in);
System.out.print("Enter the number to reverse ");
String mystring = sc.nextLine();
char[] my_3 = mystring.toCharArray(); // string converted into array
How to convert the char array back to string
for (int i = my_3.length - 1; i >= 0; i--) {
System.out.print(my_3[i]);
String b = new String(my_3[i]);
}