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!
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
Can someone show me this how it should look?
Now replace your name with the firstName variable using the string formatter.
// I have setup a java.io.Console object for you named console String firstName = "Rob"; console.printf ("%s can code in Java!");
Allie O.11,601 Points
Make sure to add the firstName variable after your string:
console.printf ("%s can code in Java!", firstName);
Kenneth LoveTreehouse Guest Teacher
I'm not a Java programmer but I did this stage. In the stage, Craig
printfs out a string to
console where he put his name in. You need to copy that code but change the sentence that the name gets put into.
printf requires two things. The string to format and, ultimately, print, and the values to format the string with. You're only missing the value for formatting the string.
exactly Ken. And other students may understand it easier because most that do come on here have a basic knowledge of java or have used it. I have never touched it in my life. My games i code use a combination of basic python and php. believe it or not, it's different from what i am used to. so when a situation arises, im thinking of all the things i could do in python.
yeah i just don't follow. This is supposed to be a learning curve and it's not, explanation format in the challenges just dont help at all. time to go to school i suppose there is no other way around it. for some people it's not so plain english. Thanks Ken for your time.
AWESOME ALLIE! THANKS! lol thats what i was looking for.
Directed to Ken: so when it says Now replace your name with the firstName variable using the string formatter.
This is how i Read it. //now replace your name "Rob" with the firstName variable //-->this is what i see it like: firstName "Rob"; <-- to me thats what firstName varibale means.
Next. //using the string formatter "%s". <--thats what i see. so in a complete format this is how i see it.
String firstName "%s"; lol . When the explanation is written that way i take it literally now, and that's what i come out with
yeah i already have a funny feeling when seeing python. cause i can recall the codes better. I do it nearly everyday. First thin i learned in Python about things was print, str, expressions and etc. all that made sense and it was step by step so i picked it up naturally. when to use () or when to use  and how to save things to memory and etc.. this maybe similar but writing it out is little different and honestly Videos are superb. but explanations is where i go bonkers. It's like studying for a test than next thing you know, the words are worded in a way where you have to dig deep into a part of your brain that understands them. for me it's not so easy cause im used to one method and when it switches. i feel like an idiot