I have a program in Java that takes the users input of a number, converts it to a string and then reverses the number and prints it out (e.g: INPUT: 789 OUTPUT: 987).
This program runs in every other IDE except Sublime Text 3. I'm assuming this is a problem with my copy of Sublime Text but I don't have the slightest clue whats causing it as all of the code is correct. Anyone have any ideas?
Code below:
import java.util.Scanner;
public class Reverse {
public static void main(String[] args) {
System.out.println("Enter a number: ");
Scanner reader = new Scanner(System.in);
int number = reader.nextInt();
String numbs = Integer.toString(number);
String reverse = new StringBuffer(numbs).reverse().toString();
System.out.println(reverse);
}
}