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

alan alhamid
PLUS
alan alhamid
Courses Plus Student 114 Points

I have placed several errors in this challenge. To fix them you must remove the // to uncomment them and then correct th

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.

I dont know where is the error

FixMe.java
Sting firstName = ("Gordon");

string lastName = ("Sumner");

console.printf("Gordon Summer", firstName, lastName);

console.readLine("What is your name?  ");

1 Answer

Gabriel Precup
Gabriel Precup
4,565 Points

first, since Java is case sensitive, you must change the "string" to "String". The second error is, in the printf, two variables are asked to be shown, so instead of the string "Gordon Summer", you must introduce those variables with ("%s %s", firstName, lastName).