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 trialTravis Bentz
640 PointsHow do I string console.readLine, keep getting error message
String firstName = console.readLine("What is your name? ");
This is the message I keep getting everytime I put input. What am I missing?
treehouse:~/workspace$ javac Introductions.java
Introductions.java:8: error: incompatible types: String cannot be converted to boolean
String firstName = console.readline("What is your name? ");
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
treehouse:~/workspace$
1 Answer
Craig Dennis
Treehouse TeacherIts case sensitive, you spelled it right in the title, but not the code. console.readLine
capital L
Hope it helps...I will try and fix that error message.
Hope it helps!
Travis Bentz
640 PointsTravis Bentz
640 PointsString firstName = console.readline("What is your name? ");
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
treehouse:~/workspace$