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

They tell me error: cannot find symbol

They say this: JavaTester.java:116: error: cannot find symbol String Name = readLine("Enter your name: "); ^ symbol: method readLine(String) location: class JavaTester And here is the code: String Name = readLine("Enter your name: ");

2 Answers

Hi Zandre, I believe this is the challenge where you're supposed to enter your name. In that case readLine is a method that is on the predefined console object.

So it should be

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

I think this means that the method readline doesn't exist in the current code context. Is readline meant to be called on an object? (if this is in reference to a code challenge or a workspace, more detail about the problem would help)