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 Using your New Tools Errors

Paul M
Paul M
16,370 Points

Why is my string not working when i do this: String name = console.readline ("Enter your name: "); whats wrong?

it has an error in the first quotation marks

5 Answers

"readline(...)" method name is incorrect; 'l' is being used instead of 'L' in the method name. You can try the following:

console.readLine("Enter your name: ");
Usen Ekpek
Usen Ekpek
1,634 Points

Can you post the actual question asked or task given?

Remember Java is case sensitive and also Java uses camel casing with its class method as well

put readLine instead of readline

Leif Christian Lien
Leif Christian Lien
884 Points

Question : Creat a new variable called name, and accept input from the console using the readLine method. Answer : String name = console.readLine("Enter your name: ");

Usen Ekpek
Usen Ekpek
1,634 Points

I do not see anything wrong with your answer. You should contact MOD.

String name = console.readLine("Enter your name: ");

Try to copy and paste from mine to see if it will work. If it doesn't, contact any of the TeamTreehouse Staff.

Hi Paul!

It may be helpful to read up on CamelCase a bit, here are two informative links that could be of use to you:

http://searchsoa.techtarget.com/definition/CamelCase http://java.about.com/od/javasyntax/a/nameconventions.htm

Muhammad Asif
PLUS
Muhammad Asif
Courses Plus Student 557 Points

readline method is misspelled instead readline it is readLine