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

Spelling is correct then why is it throughing an error

console.printf("Nirbhay can code in Java!");

What is wrong with this syntax

It is showing spelling mistake

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Nirbhay";

console.printf("Nirbhay can code java!");

2 Answers

My best guess is that you have spelled Java with a lower case j in your String. The checker is VERY picky about producing exactly what the question asks for.

Jazz Jones
Jazz Jones
8,535 Points

In this code challenge, it is asking you to use the declared variable in the (firstName) in the print command, using the %s symbol.