Hi I’m having a problem with sublime text 3.
Some code I’ve written that takes the users input of a number, converts it to a string then reverses it and prints it out wont show the reversed string.
The code is fine as it runs without error in other IDE’s but Sublime wont for some reason.
The code does make use of the scanner utility and string buffers but I can’t see how either of those would cause the problem.
I’ve added the code bellow if anyone wants to try it out on theirs to see if its maybe just a bad install I have.
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);
}
}