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

Java Java Basics Using your New Tools Multiple Format Strings

Ravon Henson
Ravon Henson
4,038 Points

Very confused

I really didnt pay attention too well to the video

Multiple.java
// I've imported java.io.Console for you.  It is stored in a variable called console for you.
String name = console.readLine("enter somethin");

2 Answers

Hi

There is a Console Library that you would normally import into you project before you can reference it in your project.

The problem is stating the following:

// I've imported java.io.Console for you. It is stored in a variable called console for you. String name = console.readLine("enter somethin");

meaning that someone did this for you (pseudo code)

import java.io.Console; Console console = new Console();

and now you can do:

String name = console.readLine("enter somethin");

if this answers your quation, please mark the question answered.

Ravon Henson
Ravon Henson
4,038 Points

This did not work but im giving it best answer because treehouse is blowing up my emails

Hi

Please see this http://www.tutorialspoint.com/java/io/console_readline.htm

My code is pseudo code ... just to provide the idea how it should work

Thanks