I am having a little trouble using the Console class. I imported the class as well as read on the methods that I need to complete the job. However, it keeps giving a Null Pointer exception.
The error is this: Exception in thread "main" java.lang.NullPointerExceptionCode:
Console console = System.console();
String username = console.readLine("User: ");
at Next_Palindrome.NextPalindrome.main(NextPalindrome .java:11)
Java Result: 1
Any ideas? This is all the code that is running btw.