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 IO

Please help. It says the period is an error. I can't find what's wrong. Trying:store first name using console.redline.

Challenge: Declare a variable that is named the camel-cased version of "first name". Store the users first name into this new variable using console.readline.

IO.java
// I have imported java.io.Console for you.  It is a variable called console.
String fristName = console.readline("first name"  );

I fixed the spelling and tried it again and it still came up with the same error. Why is the period the error?

2 Answers

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

The error you are getting is this?

error: cannot find symbol and is has a ^ pointing at the period correct?

If this is the case you still have a letter casing issue with the function you are calling on console.

If you look at the Console doc and scroll down to method summary and look for that method you are using called readLine(). Compare your casing to the method casing.

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Hi Madison,

When you run into errors, be sure to also double check your spelling. Also methods(functions) ARE case-sensitive. So capital letters and lowercase matters be sure to check your casing. :)

String firstName = console.readline("first name" ); I fixed my spelling error, I did not see that, but it still says the period is the error. I have tried to change the case of the letters but it is still saying that the period in the console.readline is the error.

Thank you. It worked