public:不同包、同一包、类内都可用private:类内protected: 不同包的子类、同一包、类内都可用不写时:同一包内、类内default(friendly) 转载于:https://www.cnblogs.com/arvins/p/8404574.html