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 trialCody Gonzales
Courses Plus Student 168 PointsNeed Help:Using the printf method, display a message that says, "First name: ", followed by the first name that the user
Im stuck in Java basics, challenge 3 task 3 of 4
// I have imported java.io.Console for you. It is a variable called console.
String firstName = console.readLine ("Cody");
String lastName = console.readLine ("Gonzales");
console.printf("First name: " );
1 Answer
Balazs Peak
46,160 PointsI'm not allowed to flat-out tell you the solution, but I give you this: you have to use concatenation operator, and you have to use it inside the parentheses of the printf function, right after the "First name: ".
If you've missed the concatenation operator from the video, just use Google, like searching for "Java concatenation". If you decide to walk this path and master programming, you will be using search engines a lot. :)
I hope this helps! Much love!
Cody Gonzales
Courses Plus Student 168 PointsCody Gonzales
Courses Plus Student 168 PointsThank you very much for your answer Balazs! I'll use your info for sure. I am just starting on my adventure into learning programming, so this is all very new to me. Your feedback is greatly appreciated.
-CJ
Balazs Peak
46,160 PointsBalazs Peak
46,160 PointsYou are most welcome! You can pick me up on facebook and ask me anytime! Just click on my name or something like that, and you can find my profile, where my facebook will be displayed!