Access modifiers are arranged in order of access

public > protected > Friendly (in the Java programming ideas: friendly) with default> Private 

public: public
protected: protected in the same package, and subclasses of the parent class in the same package (sub-class may be in another package inherited)
friengly (default): the same package (this modifier not write, just to give an idea here, is ... nothing in the code)
Private: only in class, outside class name can not be accessed by

Guess you like

Origin www.cnblogs.com/concentrate-haolong/p/12057622.html