Can't read console for simple GUI, I'm using: import

// here’s the code, I want to be able to say what my name is, and then it will say “Hi, Chris!”

package tutorial;


public class Tut {

	public static void main(String[] args) {
		System.out.println("Hello Tutorial!!!");
		Console hi = System.console();
		System.out.println("What's your name?");
		String sup = hi.readLine();
		if (sup.length() > 1) {
		System.out.println("HI, " + sup + " .");


// If you could point me in the right direction that would be awesome!

Um, you can use like another code editor or best for java Eclipse you cant do this on codecademy unfourtunately

i am using eclipse:

Its a null pointer exeption. You can either search about that, or best if you ask that in

Stack Overflow

if you are bent on using the Console class then read on a solution HERE. As far as I have read, using a console object in an IDE(which provides an abstraction layer) will always give null.

Possible Solution for achieving I/O interaction with user is via the SCANNER CLASS or the

Thanks guys, and happy holidays!