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 trialMike McGuire
Courses Plus Student 51 Pointsstill confused
JavaTester.java:87: error: cannot find symbol String firstName = console.readline("What is your name?"); ^ symbol: method readline(String) location: variable console of type MockConsole 1 error Take out the ; and java asks for it. Put it back in and I get this error
I feel dumb not being able to fix it, I have found all other errors, but this one I don't understand.
// I have imported java.io.Console for you. It is a variable called console.
String firstName = console.readline("What is your name?");
console.printf("Hello my name is %s\n",firstName);
console.printf("%s is learning to wrrite java\n",firstName);
1 Answer
Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 PointsHello, it looks like java is getting hunt up my the method readline(), it should be readLine() with camel casing on the method, otherwise java won't recognize it.
I see that you're also printing out lines that were from the last challange, go ahead and remove those from now and just print the lines that the challange asks for, really for this step in the challenge what you should have is.
String firstName = console.readLine("What is your name?");
Don't feel pressured by this, it takes time unfortunately, lots and lots of time. Really any progress should be proud of.
mikes02
Courses Plus Student 16,968 Pointsmikes02
Courses Plus Student 16,968 PointsHi Mike,
It's great that you are posting in the forums and definitely encouraged. For future reference it would be great if in your post title you could be more specific about what the issue is, it will assist other forum members in being able to help you, and other members who may be facing similar issues will be able to find your post and could definitely benefit from it as a result. Thank you!