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!
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
ryann ma2,682 Points
I have an error. I wrote it just like the teacher wrote it but still
Picked up _JAVA_OPTIONS: -Xmx128m
^[[ATreeStory.java:13: error: incompatible types: String cannot be converted to boolean
String name = console.readline("Enter your name: ");
TreeStory.java:14: error: incompatible types: String cannot be converted to boolean
String adjective = console.readline("Enter your name: ");
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
As long as you initialized console, your code is correct, but you have to remember to camelcase. So readline should be readLine.
Console console = System.console(); String name = console.readLine("Enter your name:")