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 trialDov Brodkin
2,695 PointsClass issues in Java
In Java Objects, I had to write a class,
public class GoKarts {
}
Yet it will not except it, does anyone know why?
public class GoKarts {
}
Jeremy Hill
29,567 PointsIf your file is GoKart.java then your class should be named GoKart- without the 's'.
1 Answer
Jacob Bergdahl
29,119 PointsThe class should've been called GoKart in singular, not GoKarts in plural :) The way the question was phrased I see it was an easy mistake to make! Make sure to always double-check the question and the file name when something isn't working :)
Dov Brodkin
2,695 PointsThank you.
Dov Brodkin
2,695 PointsDov Brodkin
2,695 PointsNevermind I reopened the page and did the exact same thing, which work (no clue why, I wrote the same code).