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

david dubuc
david dubuc
252 Points

I do it wrong where my fault sorry im french loll

What its wrong with this: console.printf ("Hello my name is David"); yourName = ("%s hello my name is david \n);

Name.java
console.printf("hello My name is David");
yourName = ("%s hello my name is David"\n);

4 Answers

Java is also picky about capitalization.

This means that string is different than String. Notice the capital S and the lowercase s.

Java is case-sensitive! :smile:

I hope this helps. ~Alex

Bonjour David,

Let me help you with it

First part: You store your name in a String variable called firstName. Simple

String firstName = "Gunjeet";

Second part: You print it off using console.printf statement

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

ne pas difficile ;)

david dubuc
david dubuc
252 Points

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

string firstName = "david" ; console.printf ( "%s can code in java!",); what its wrong now scuse .. lol

david dubuc
david dubuc
252 Points

case sensitive ! he make me a bit a$@#$?$&$%@&%@$ hahahaha Its work thanks Is not easy when you learn to speak english and code in same time