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

seriously I need help AGAIN

I can't do this alone

// I have imported java.io.Console for you.  It is a variable called console.

1 Answer

Take this step by step.

  1. You need to declare a variable. To do that you need a type and variable name. What type, from those you learned, is appropriate to store a first name? The challenge tells you what to call your variable, "first name" in camel case means "firstName".
  2. You also need to assign a value to the variable. You learned how to do that in previous videos, right? How would you do it if you wanted to assign it the first name "Michael" for example?
  3. You want the user to input the first name through the console. You learned how to do this in the previous video. The comment tells you that there is already a Console object stored in the "console" variable, so you only need to use that object and call its "readLine()" method.
  4. Please try to think of all those steps in this order, and come back here to tell us which of those steps you have an issue with.