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 Using your New Tools Multiple Format Strings

I don't know where the error is. Got errors when following the video as well.

In the video right before this part you're supposed to follow along and then clear, compile and run in the console, mine didn't work there either so i looked at the FAQ under that video and there were multiple people with the same issue and their questions weren't answered either. Mine looks exactly like the guys in the video. I'm about to give up on java all together.

Multiple.java
// I've imported java.io.Console for you.  It is stored in a variable called console for you.
string name = console.readLine ("Enter your name:  ");

1 Answer

Steven Parker
Steven Parker
231,275 Points

Did you try the "Preview" button? Doing that displays the compiler output:

JavaTester.java:116: error: cannot find symbol
string name = console.readLine ("Enter your name:  ");
^
  symbol:   class string
  location: class JavaTester
1 error

You can see where the compiler is marking the beginning of the word "string". Since Java is case sensitive, it doesn't recognize that as a type name. But change it to "String" (with capital "S") and you'll pass task 1.

You're a GIFT!!!!