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

Errors Challenge Task 1 of 4 Uncomment the first line and fix the error

If you do not see the error, click submit and view the Preview pane to view the compiler error. The code below is what was provided //Sting firstName = "Gordon"; My code was //String firstName = "Gordon"; and the error I got was Bummer! Make sure you have fixed the first line by defining a String named firstName I have done everything I can do to define a String named firstName. Please help

FixMe.java
// String firstName = "Gordon";

// string lastName = "Sumner";

// console.printf("Hello %s", firstName)

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

6 Answers

Jack Cummins
Jack Cummins
17,417 Points

If you thought I gave a good answer, you can upvote my answer and give my answer a "best answer".

Jack Cummins
Jack Cummins
17,417 Points

You forgot to uncomment your code.

String firstName = "Gordon";

String lastName = "Sumner";

console.printf("Hello %s", firstName)

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

You also forgot to capitalize String on your second variable.

Jack, Thank you I figured it out. Sorry for the delay in responding.

Ted

Thank you again Jack

Jack Cummins
Jack Cummins
17,417 Points

Your Welcome!

Happy coding! Jack

P.S. Keep it up with the Java!

Jack, Thank you sir