Welcome to the Treehouse Community
Looking to learn something new?
Abe DanielsCourses Plus Student 2,781 Points
How do I print a question, and label the response as a string?
I feel like this is right.... What am i missing?
// I have initialized a java.io.Console for you. It is in a variable named console. String response; response = console.printf("Do you understand do while loops?");
Philip Schultz11,343 Points
I believe you would use the console.readLine(""); to store the answer in response.
Grigorij Schleifer10,363 Points
Try this :
Console console = System.console(); String response = new String(); response = console.readLine ("You Input " ); System.out.println (response);
Hope it helps ...