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 trialalan alhamid
Courses Plus Student 114 PointsI need help
I have placed several errors in this challenge. To fix them you must remove the // to uncomment them and then correct the error.
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.
// Sting firstName = "Gordon";
// string lastName = "Sumner";
// console.printf("Hello %s", firstName)
// band = console.readLine("Which band? ");
3 Answers
Rick Gleitz
47,876 PointsOK, in the first one the word Sting is misspelled; change it to String. Remember that you have to do it with the original format from before; it should go from looking like the first line to the second:
// Sting firstName = "Gordon";
String firstName = "Gordon";
- so it gets uncommented and Sting gets changed to String.
Then proceed to do similarly to the other lines in the next parts of the challenge.
Rick Gleitz
47,876 PointsHi Alan, The first part of the challenge is to work on the first line. Step One: Uncomment the line. Step Two: Look and see what could be wrong with this line of code (it could be a capitalization error, leaving off the semi-colon at the end of a line, a misspelling, or an undeclared data type). Then proceed with the rest of the lines in the following parts of the challenge. Don't forget to read the instructions well. If you check your work and it's not correct, there will be an error code that may be helpful.
Hope this helps!
alan alhamid
Courses Plus Student 114 PointsSting firstName = ("Alan");
string lastName = ("Alhamid");
console.printf("Alan %s", firstName, lastName)
console.readLine("what is your name? ");
is that correct
Rick Gleitz
47,876 PointsNo, you just uncommented them all and changed them. Don't change them the way you did. Each line has something simple wrong with it as I stated in my previous message. Look for the four problems I mentioned, one of them is in each line (not in order, though). Don't put your info into anything here.
alan alhamid
Courses Plus Student 114 Pointswell I did there is still error