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

What am I missing in this program?

Code is attached

Name.java
// I have setup a java.io.Console object for you named console
string firstName;
firstName = Joey;

1 Answer

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,077 Points

I think you need to review Strings:

For starters you need to capitalize the type for your string variable, it should read: String firstName

Next remember how strings are represented in Java, they need to have quotations around them, so if you are assigning firstName it should be: String firstName = "Name goes here!".

I will assume that you can use this knowledge to solve the rest of the problem, but if you need more assistance let me know.

Again I recommend rewatching the video preceding this challenge, and then any video covering Strings.