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) Delivering the MVP Refactoring

James Treehouse
James Treehouse
6,593 Points

Not sure why I was getting this error. Does my browser cache affect the console?

./Prompter.java:25: error: incompatible types: String cannot be co nverted to char
isHit = mGame.applyGuess(guessAsString);
^

I got the above error (using javac Hangman.java && java Hangman) for some reason following the example in the videos word for word. I was wondering how I got it? I was thinking it was because I didn't javac my Prompter.java / Game.java files but I looked at my console history and javac Prompter.java also gave me the same error. I also looked at the refactoring video and Craig only used clear && javac Hangman.java && java Hangman to run the program.

It worked after I did javac Prompter.java && javac Game.java in one line then java Hangman on the next line. Does this have to do anything with my browser cache?

Snapshot : https://w.trhou.se/8d9b92fpnm

4 Answers

I don't think it has to do with browser cache. I know I have had my workspace bug out on me before and sometimes I get stupid errors like this due to lack of saving.

James Treehouse
James Treehouse
6,593 Points

That's what I was thinking. Could have sworn I was saving but I'd bet I wasn't. Thanks!

You probably did save. This same error happened to me and I saved and resaved.

I'm wondering the same thing. I'm guessing browser cache must be the problem, because I saved many times and still got errors, even though the program ran after, which it wouldn't if there were errors stopping the code. However, closing the workspace window, and relaunching it caused the errors to disappear.