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 Perfecting the Prototype Censoring Words - Looping Until the Value Passes

Lauren Lolo
Lauren Lolo
352 Points

Error Message?

I am not getting the same error message as the video. Help, please?

The error says this:

TreeStory.java:47: error: ')' expected
noun.equalsIgnoreCase("dork"));
^
1 error

(if the question isn't clear, the carrot icon is pointing at the semi colon)

3 Answers

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi Lauren,

The error you are getting is giving you a hint to what is wrong:

error: ')' expected

Basically it is telling you that there is a closing parenthesis that was not expected to be there.

:P Hope this helps.

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

Your code is: noun.equalsIgnoreCase("dork")); but you need: noun.equalsIgnoreCase("dork");

Lauren Lolo
Lauren Lolo
352 Points

but now I have more problems?

TreeStory.java:42: error: ')' expected noun.equalsIgnoreCase("dork"); ^ TreeStory.java:47: error: ')' expected noun.equalsIgnoreCase("dork"); ^ TreeStory.java:47: error: ';' expected noun.equalsIgnoreCase("dork"); ^ 3 errors

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

Can you paste your code? Im quite new to programming, but it sounds interesting :)