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

Weird error message on Code Challenge on the Java track during the second part of the Java Objects Course.

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I received your request for assistance and took a look at the challenge and your code. You got almost everything correct except you forgot to say what data type MAX_BARS should be. As you know, in Java, it will demand a data type so it's encountering an equals sign before it is expecting one. That doesn't exactly explain the odd formatting of the error though, and I'm guessing it's being put there by the checker on Treehouse's end. Here is the line you're looking for:

 public static final int MAX_BARS = 8;  //note the int inserted here as opposed to your code

Hope this helps! :sparkles:

Ah, the most vital part went right over my head! Thank you!