Frequently asked questions
- What is wrong with this class declaration?
private class someClass{ // class implementation goes here }
There are no private classes. Classes can be public or default. Public classes are public; default classes are private within their own package.
- What is encapsulation?
Encapsulation is how we contain our variables, code, and methods in a manner that exposes just the parts and functionality we want to other code.