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 Getting Started with Java Strings, Variables, and Formatting

essam rashad
essam rashad
245 Points

whats the answer to this challenge!? (step 2/3)

here is my code:

String firstName = "Essam"; console.printf("%s can code Java!", firstName);

In the preview it looks fine, but when i check work it says "Bummer!" . What am I doing wrong?

Thanks!

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Essam";
console.printf("%s can code Java!", firstName);

2 Answers

andren
andren
28,558 Points

The problem is that the message you are printing out is not the exact message that Treehouse prompted you to write, you are asked to write "<YOUR NAME> can code in Java!" in your message you have forgotten to include the "in" part. Since the challenge checker tends to be extremely picky when it comes to text output that is enough for you to fail the task.

essam rashad
essam rashad
245 Points

Ah I see, thanks!