Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Basics Getting Started with Java IO

Fong Vang
Fong Vang
182 Points

Issues with 2nd task using console.readline

For the first task, I wrote --> String firstName = console.readLine ("fong"); And it worked.

For the second task, I wrote --> String lastName = console.readLine ("vang"); After checking, I am being told that task 1 is no longer working.
I cant seem to continue.

Thanks.

IO.java
// I have imported java.io.Console for you.  It is a variable called console.
String firstName = console.readline("fong");
String lastName = console.readline("vang");

1 Answer

james south
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,258 Points

the method is readLine, not readline. it's throwing an error for me on task 1 when i use readline. i should add it often says a previous task is no longer passing when you introduce an error in the current task.