Chapter 5 hide specific implementations
1. A compilation unit must have a suffix. Java, and a public class in the compilation unit. The class name must be the same as the folder name. A Java file can have only one public class.
2. The package name actually represents its directory structure.
3. If two packages are referenced in a file and they have a class with the same name, you need to use them all. You must specify the class in which the package is used ..
4. Access Permissions
1) package access permission (default access permission)
All other classes in the package have access permissions to that member, but this member is private for all classes outside the package.
2) public (interface access permission)
Anyone can access it anywhere.
3) Private
Except for the class containing this member, no other class can access this member.
4) protected (inherits the access permission)
The access permission is only granted to the derived class rather than all classes.
5. Default package
Java automatically considers a file that is in the same directory and does not set any package name for itself as the default package of the directory.
6. The classes cannot be private or protected. It can only be the package access permission or public. (Except for internal classes)