- There are three access modifiers: public, protected, and private.
- There are four access levels: public, protected, default, and private.
- Classes can have only public or default access.
- A class with default access can be seen only by classes within the same package.
- A class with public access can be seen by all classes from all packages.
- Class visibility revolves around whether code in one class can create an instance of another class extend (or subclass), another class
- Access methods and variables of another class
Java Design Pattern - Creation Pattern
16 years ago
No comments:
Post a Comment