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

Java Java Basics Getting Started with Java Strings, Variables, and Formatting

musab abdi
musab abdi
2,096 Points

Define a string variable named frist name

this is my frist excersice in java and i am having a hard time answering it

// I have setup a java.io.Console object for you named console
String fristName = "dragon";

the spelling is first not frist if you did that by mistake. So you have to do String firstName = "dragon" insteand of String fristName = "dragon"

musab abdi
musab abdi
2,096 Points

thank you very much single mistake and your code is wrong thank you again

1 Answer

Oh yes i forgot, at the end of the code put a semicolon which is ; sorry for minor mistake but the code would be String firstName = "dragon";