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 trialThomas Domajnko
607 PointsOutput.html is getting fussy...
I have only one defective line of code, yet output gives me 8 different errors. Here is the code:
./GoKart.java:24: error: illegal start of type
return boolean mBarsCount == 0;
^
./GoKart.java:24: error: ';' expected
return boolean mBarsCount == 0;
^
./GoKart.java:24: error: expected
return boolean mBarsCount == 0;
^
./GoKart.java:24: error: illegal start of type
return boolean mBarsCount == 0;
^
./GoKart.java:24: error: expected
return boolean mBarsCount == 0;
^
./GoKart.java:24: error: ';' expected
return boolean mBarsCount == 0;
^
./GoKart.java:34: error: class, interface, or enum expected
}
^
./GoKart.java:24: error: cannot find symbol
return boolean mBarsCount == 0;
^
symbol: class mBarsCount
location: class GoKart
8 errors
Whew. :|
2 Answers
Kevin Faust
15,353 Pointsbecause if you forget to put a semicolon, the rest of your code after that will make no sense to the compiler and hence lots of error messages
Thomas Domajnko
607 PointsBut I had a semicolon at the end of the line...
Kevin Faust
15,353 Pointsso did you fix the defective line of code?