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

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,271 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.