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

Jacob O'Brien-Flasch
Jacob O'Brien-Flasch
1,734 Points

There is no code? Do i write all of the code for this because i only learned strings.

All that the exercise has is one line of comment code? do i apply everything to make the code work or no?

Name.java
// I have setup a java.io.Console object for you named console

2 Answers

Yes, think of challenges as quizzes. They will tell you to do something like a boss would at a job, and then you code it.

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

No you don't have to write the whole code as you see in the Workspace. As it is included in it by default.

You just have to do the task asked to you. For instance. If you're asked to define a String variable called 'firstName' Just type:

String firstName;