- Access control: Even though a class can't be marked private, a class can be non-public (by not declaring it as public). A non-public class can be subclassed only by classes in the same package as the class.
- final keyword: A final class means that it's the end of the inheritance line.
- If a class has only private constructors. Ex. like built-in Math class in Java.
No comments:
Post a Comment