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!
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
Jason Roe1,257 Points
Types of classes
What is the point of different class types? public, default, abstract, and final?
william parrish13,774 Points
You are setting the various levels of access to the class among other things. Setting the class as public means that it, and its methods are visible to all other classes. The default constructor makes it visible to only other classes within the same package, setting the class to final makes it unable to be extended to another class.
A pretty good explanation is available here, that breaks it down into a example related to a bicycle. http://docs.oracle.com/javase/tutorial/java/javaOO/classvars.html