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

eric lomatska
eric lomatska
39 Points

having trouble figuring out the answer to this first question.

what's the answer?

Name.java
// I have setupSt a java.io.Console object for you named console
String firstname = "eric";

1 Answer

michaelcodes
michaelcodes
5,604 Points

Hello, for this code challenge they require that you type the variable name exactly as shown. Java is a case sensitive language so it is important that you always check to make sure the right letters are capitalized! In this case, they want you to name the variable using camel casing

( which means making the first letter of the first word lowercase, and then the first letter of all following words uppercase.. Shown in example below)

These are examples of camel casing:

myVariable
camelCaseExample

So in the context of this code challenge, you want to use the code:

String firstName = "eric";

Hope this helped!

EDIT: As a side note, this camel casing style is not a requirement by Java, it is just a generally agreed upon style by many programmers to make code easier to read for yourself and others