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 trialTed Clayton
Courses Plus Student 206 PointsErrors 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
// String firstName = "Gordon";
// string lastName = "Sumner";
// console.printf("Hello %s", firstName)
// band = console.readLine("Which band? ");
6 Answers
Jack Cummins
17,417 PointsIf you thought I gave a good answer, you can upvote my answer and give my answer a "best answer".
Jack Cummins
17,417 PointsYou 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.
Ted Clayton
Courses Plus Student 206 PointsJack, Thank you I figured it out. Sorry for the delay in responding.
Ted
Ted Clayton
Courses Plus Student 206 PointsThank you again Jack
Jack Cummins
17,417 PointsYour Welcome!
Happy coding! Jack
P.S. Keep it up with the Java!
Ted Clayton
Courses Plus Student 206 PointsJack, Thank you sir