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

Abe Daniels
PLUS
Abe Daniels
Courses Plus Student 2,781 Points

errors coming up when I am typing exactly what Craig is typing.

I am watching the "Multiple Strings" video in the Java course. I have followed exactly what Craig is doing and I am getting multiple errors.... when they shouldn't be popping up. My Code:

String name = console.readLine("Enter your name:  ");
  String adjective = console.readLine("Enter an adjective:  ");
  // String noun = console.readLine("Enter a noun:  ");
  // String verb = console.readLine("Enter a verb:  ");
  console.printf("%s is very %s", name, adjective);

It is telling me it is "expecting identifiers" and that i have "illegal start of type." I promise that in the rest of my code, I have closed brackets so it can't be that I am missing something. Not to mention it's craigs exact code.

2 Answers

Abe Daniels
PLUS
Abe Daniels
Courses Plus Student 2,781 Points

I ended up figuring out that it was my fault after all. It seems like as much as we'd like to think we have the whole thing under control, there's actually an error on our part. Haha I forgot to add the "public static void main" part. :P Thank you though!

Can you copy the whole file into here, please? We should be able to fix that!

Steve.

Glad you got it sorted.

Steve.