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

I get an error in the Workspace. I can't solve it even if I do. Help?

I get this error: TreeStory.java:27: error: ';' expected
noun.equalsIgnoreCase("jerk"));
^
1 error

even though I think I got it right:

 String noun;
      boolean isInvalidWord;
      do {
  noun = console.readLine("Enter a noun:  ");
  isInvalidWord = noun.equalsIgnoreCase("dork") ||
                  noun.equalsIgnoreCase("jerk"));
                                               ^

3 Answers

It was a bug, it works now with everything the same.

Hi Ivan,

You have an extra closing bracket after "jerk")); - I'll put a comment in your code to illustrate.

Steve.

I've added a caret ( ^ ) underneath your extra bracket.

Thank you! I see now, but I wonder why it worked anyway.

I have no idea! Maybe you corrected it. Anyway, as long as you're still going and not stuck. :+1: :thumbsup: