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

how to write code for,Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!"

how to write code for following question

Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!"

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "<Navalkrushna>";
console.printf("my name is %s\n",firstName);
console.printf("%s is learning java\n",firstName);
console.printf("%s can code in Java!",firstName);

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I took your code and copy/pasted it into the challenge, and it passed all three steps without problem. I highly suggest you restart your browser (and the challenge) and copy paste what you have written here into the challenge. If you're still experiencing problems you might consider contacting Treehouse support. However, keep in mind that because you put the angle brackets around your name, this will cause the print statements to print out those angle brackets as well. While I don't believe this to be the intention of the challenge, it still doesn't cause the challenge to fail. Happy coding! :sparkles:

Thank you Jenni!

Jay Siddik
Jay Siddik
11,901 Points

Can you help me solve the "FizzBuzz" Code ?

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

jay siddik k Probably, yes :smiley: But in order to keep the different code challenges at least moderately searchable inside the help topics, I'd ask that you post a brand new question to the Community showing both your code and the challenge in question.