Access modifier rights

We learned there are four kinds of modifiers, authority detailed as follows:

public can access from anywhere;

protection of rights can only be protected in this package and subclasses of access to other packages;

defaule (Do not write) the default permissions can only be accessed in this package;

private proprietary rights can only be accessed in this class;

 

Guess you like

Origin www.cnblogs.com/lxc127136/p/12539297.html