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

JOSEPHINE MUFOWO
PLUS
JOSEPHINE MUFOWO
Courses Plus Student 158 Points

compiler error

Hello what is the problem with my solution?

String FirstName = ''Josephine'';

Name.java
// I have setup a java.io.Console object for you named console
String FirstName = ''Josephine'';

3 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hi Josephine,

Your syntax is correct except for the quotation marks being used. It looks like you are using 2 single quotes? You can use either single quotes (') or double quotes ("). Double quotes, however, are an actual character. They are not 2 single quotes together. On a US keyboard, the double quotes are Shift + '.

Just fix that up and the rest looks good.

Nice job! :) :dizzy:

Use the camel casing method on assigning your variable as well as paranthesis i.e. String firstName = ("Josephine");

haha