类成员变量访问权限

时间:2021-11-17 15:00:24

public 所有类

private 自己

protect 同一包和子类

什么都不写 只能被同一包访问