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 Objects (Retired) Creating the MVP Prompting for Guesses

Christopher Borchardt
Christopher Borchardt
2,908 Points

compile error

I am getting a complie error that I"m not sure about.

https://w.trhou.se/2w8jyw34b8

The error is Picked up JAVA_TOOL_OPTIONS: -Xmx128m
./Prompter.java:13: error: cannot find symbol
car guess = guessAsString.charAt(0);
^
symbol: class car
location: class Prompter

I can't see what the typo is that i must have made at some point

Craig Fender
Craig Fender
7,605 Points

I think you meant char where you spelled car. That should fix the problem.

To be more specific, in Prompter in line 13 you wrote

car guess = guessAsString.charAt(0);

Where it should be

char guess = guessAsString.charAt(0);

Christopher Borchardt
Christopher Borchardt
2,908 Points

for some reason can't select your reply as best answer craig.

Craig Fender
Craig Fender
7,605 Points

That's because I made a comment when I meant to make an answer. Oops. lol

1 Answer

Christopher Borchardt
Christopher Borchardt
2,908 Points

lmao, ok, i see the problem. i was on the wrong .java page. i figured it was supposed to be char, but i couldn't for the life of me find where i had typed car instead of char :) thank you