Hidden implementation 1. Object-oriented, the most critical problem is "will be changed and not changed." 2. Access rights control: A.PUBLIC Access: Access the permissions of the interface. All classes can be accessed. B.Protecked Access: Inherited access. Members of the same package can access, subclasses
Access. C.Package Access: Default access, sometimes referred to as Friendly. Only the same belongs to this
Package's class can access this member. D.Private Access: Unless you use this class (including class of this member), you will not
Access. 3.Class limits a. Each compiler can only have a public class, you can add any multiple provisioning to this compiler.
A class of package privileges for assisting features. The name of the B.PUBLIC class must be exactly the same as the file name of this compiler, including uppercase. C. There is no public class in the compilation unit, which is allowed. At this time, the file name can be arbitrary. 4. Note that the class cannot be private and protected. There are only two access rights: package and public.
(In fact, the internal class can be a private or protected). If you don't want others to access this class, you can
Make his constructor into privated, so no one can create the object of that class, and you can
Use a STATIC to create an object. Single point mode implementation principle.