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

Development Tools

Travis Bentz
Travis Bentz
640 Points

How 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$

Travis Bentz
Travis Bentz
640 Points

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
STAFF
Craig Dennis
Treehouse Teacher

Its 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!