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 trialvarun singh
Courses Plus Student 1,087 Pointsgetting null Exception error when run the code.. ./Prompter.java:1: error: cannot find symbol
./Prompter.java:1: error: cannot find symbol
import java.io.console;
^
./Prompter.java:12: error: incompatible types: String cannot be converted to boolean
String guessAsString = console.readline("Enter a letter: ");
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
2 Answers
Athanasios Kourtzis
6,437 PointsWithout knowing how your code looks like I guess, from reading your error message, that your import on top of your code should be like this
import java.io.Console;
The letter c should be uppercase. Since you have the error message "./Prompter.java:1: error: cannot find symbol import java.io.console; " fixing the typo should be enough.
Thomas Domajnko
607 PointsYou also forgot to capitalise the C in that line. ;)
Kevin Faust
15,353 PointsKevin Faust
15,353 PointsHey Varun can you post your entire code?