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

Justin Townsend
Justin Townsend
4,720 Points

Java Beginner here

I am not sure what to do I am a beginner to Java

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Justin";
console.printf("%s\n", firstName);

2 Answers

Tonnie Fanadez
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 Points

Hi Justin Townsend

Welcome to Java, it is my favorite language and we're all here to help you out. I can see you got the first part of the challenge spot on - see you're doing a fantastic job.

From your above code you just forgot to write "can code in Java!" . Write this and you will pass the challenge

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

hope this helps

Justin Townsend
Justin Townsend
4,720 Points

It really did thank you for those encouraging words! and your help!

Sean M
Sean M
7,344 Points
console.printf("%s is your name", firstName);

Means to insert your name (firstName) where %s is located.