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 trialKelly Braun
Courses Plus Student 36 PointsJava lesson 2 1st q dont know
Help me
// I have setup a java.io.Console object for you named console
1 Answer
Ivan Penchev
13,833 PointsThat means that you have an object called "console" which you can use with all the methods from the Console class, that you have in Java, you can see documentation here: https://docs.oracle.com/javase/7/docs/api/java/io/Console.html
So if you type:
console.readLine()
that would Reads a single line of text from the console.
why is this said beforehand, is because typically you would have to do the initialization of the objects yourself. Which means that you would have to write something like this:
Console console = System.console()