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

Jose Torres
PLUS
Jose Torres
Courses Plus Student 2,493 Points

band = console.readline("Which band? "); can't find the error in this part of the question

I am having trouble finding the corrections in this part of the question

FixMe.java
String firstName = "Gordon";
String lastName = "Sumner";

console.printf("Hello %s", firstName);
band = console.readLine("Which band?  ");

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You did great right up until the last line! But now you're using console.readLine to read in input from the user and assign it to a variable named band. And this would work perfectly, except that you never declared the variable band. So to do the the assignment and declaration on one line you first have to say what data type will be stored in that variable. See the first two lines of your code for a hint!

I hope this helps, but let me know if you're still stuck! :sparkles: