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

how to fix this error Oops! It looks like Task 1 is no longer passing.

what i can i do i want to answer next task Task 1 correct

Name.java
// I have setup a java.io.Console object for you named console
console.printf ("Tnashe");

1 Answer

Daniel Vigil
Daniel Vigil
26,473 Points

Task 1 states the following:

Define a string variable named firstName that stores your name. Set the value to your name.

Based on the code sample you have provided there is no variable for your name. and should be used like this:

console.printf("%s can code in Java!", firstName);