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 trial
daniel zaragoza
1,843 PointsI'm trying to practice but the console. method is not working in compiler that im using. Help!
I like to practice what i learn for at least 2 hours but sometimes i just don't have the time to log into treehouse to use my workspace, nor do i want to download a bunch of software onto my laptop. So, I did a quick google search and i found a free online java compiler but when i try and use the console method it does not work. Here is the web address: ( www. tutorialpoint.com/compile_java_online.php ). Any help would be of great use, thank you
2 Answers
Alper Ersoy
1,281 PointsHello,
You must add import -java.io.Console;- before your class. And in your main method, you must say -Console console = System.console();- After these your console.printf should work.
Alper
Alper Ersoy
1,281 PointsHere is a screenshot; http://postimg.org/image/4o53f2qhf/
daniel zaragoza
1,843 Pointsdaniel zaragoza
1,843 PointsCan you please take a screen shot of how you did it because I'm trying to do it and it still doesn't work. Thanks in advance.