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 Data Structures - Retired Getting There Packages

Aditya Puri
Aditya Puri
1,080 Points

A problem in the next challange

So this is my BlogPost class code- http://prntscr.com/cdg4v3

Here is my main class code- http://prntscr.com/cdg54u

And here is the error- http://prntscr.com/cdg5b4

Now I have checked the code a LOT of times but can't seem tofind the root of the error please help..

1 Answer

andren
andren
28,558 Points

The problem is the fact that you have parentheses after the class name, while methods, constructors and some other declarations in Java require parentheses, classes does not.

That is why the error is pointing at the parentheses and stating that it was expecting an opening bracket.

Aditya Puri
Aditya Puri
1,080 Points

oh, thx for the answer!!