Four access modifiers common usage rights at work

1.public

public service of the common interface services, or use as a public static final ... as a public constants for sharing, common in other frameworks, the relationship between ordinary programmers nothing.

2.protected

Rarely protected encountered in business code, in multi-frame.

3. Default

Rare

4.private

private entities common in a variety of categories, service, private constants, with more in the work.

Guess you like

Origin www.cnblogs.com/jueshixingkong/p/12078995.html