在不同包,子类继承后可以使用父类的protect权限的属性或方法父类:package com.tinyphp;public class Father{ protected String name;}子类:package com.test;import com.tinyphp.Father;cl... Read More
posted @ 2014-05-12 22:50 tinyphp Views(1885) Comments(0) Diggs(0)
访问权限四大类:权限从大->小1、public: 公共权限2、protected: 受保护权限3、default: 包级别访问权限/默认权限4、private: 私有权限以public为例,使用方法如下:public class Test{ public int i; publ... Read More
posted @ 2014-05-12 17:36 tinyphp Views(421) Comments(0) Diggs(0)