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 Fix the Errors

Hassan Osman
Hassan Osman
628 Points

i dont know

heeeeeelp challnege 4/4

FixMe.java
 String firstName = "Gordon";

 String lastName = "Sumner";

 console.printf("%sHello %s", firstName,lastName);
String = console.readLine("gordon summer: ") ;

3 Answers

You replaced the variable name with it's type. They should both appear in your code. That means:

String band = console.readLine("Which band?  ");

When utilizing a readLine, or any variable initialization for that matter, you need to have a variable declared after the type. String is the type of variable, but you need to store the input somewhere. The following code you have String = console.ReadLine("Message"); will break because there is nothing to store the input in to. Using String someVariable = console.readLine("Input something: "); would work because now you have a place to store your input.

I hope this helps! Happy coding!

in the fourth sentence, you must enter the variable name because you just have the data type.