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 trialAry de Oliveira
28,298 PointsJava Basics
String firstName ="Ary de Oliveira estudante at treehouse web desing"; console.printf("Hello, my name is %s\n", firstName); console.printf("%s is learning how to write Java\n", firstName);clear
i need help i do not see the error please.
// I have setup a java.io.Console object for you named console
String firstName ="Ary de Oliveira estudante at treehouse web desing";
console.printf("Hello, my name is %s\n", firstName);
console.printf("%s is learning how to write Java\n", firstName);clear
3 Answers
Christopher Augg
21,223 PointsAry de Oliveira,
Here is an example and explanation for each task according to their instructions:
// Task 1: Only assign a String of your first name here
String firstName = "Christopher";
// Task 2: add a new line to print out the String "<YOUR NAME> can code in Java!"
String firstName = "Christopher";
console.printf("Christopher can code in Java!");
// Task 3: Change the print statement in Task 2 so that your name
// is replaced by the variable firstName using the string formatter %s. Do not add a new line.
String firstName = "Christopher";
console.printf("%s can code in Java!", firstName);
You also had the word clear on your last line. You would not want that in your code.
Hope this helps.
Regards,
Chris
Ary de Oliveira
28,298 PointsBest Answer thank you Chris.
Ary de Oliveira
28,298 Pointsthanks for the help Ary