Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialshaggy ped
Courses Plus Student 547 PointsConsole I/O is not working in netbeans or eclipse ??
why Console I/O is not working in netbeans or eclipse ?? Showing error "Exception in thread "main" java.lang.NullPointerException at applet_string.MyClass.main(MyClass.java:18) C:\Users\Sagar\AppData\Local\NetBeans\Cache\8.1\executor- snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 0 seconds) "
3 Answers
William Li
Courses Plus Student 26,868 PointsHi there.
The console object only becomes available when you run your java code via Console/command line interface; Eclipse, being a GUI IDE, has no Console environment.
William Li
Courses Plus Student 26,868 PointsJava gives you several means to take user input, such as Scanner class, BufferedReader ... among others.
Check out this popular StackOverflow thread for examples on how to user them. Cheers.
shaggy ped
Courses Plus Student 547 PointsThank You !!!!!
shaggy ped
Courses Plus Student 547 PointsThen how can i take user input in Eclipse IDE??