网站建设技术线路选择,知乎推广公司,如何制作h5海报,sae wordpress主题/** 2 * 1.内部类可以直接访问外部类的成员#xff0c;包括私有 3 * 2.外部类要访问内部类的成员必须创建对象 4 * author jjz 5 * 6 */ public class outer { //外部定义的方法 public void play(){ System.out.println(“我喜欢打篮球”); } public static void main(String…/** 2 * 1.内部类可以直接访问外部类的成员包括私有 3 * 2.外部类要访问内部类的成员必须创建对象 4 * author jjz 5 * 6 */ public class outer { //外部定义的方法 public void play(){ System.out.println(“我喜欢打篮球”); } public static void main(String[] args){ outer wainew outer(); wai.play(); outer.inner neinew outer().new inner(); nei.say(); } class inner{ //内部定义的方法 public void say(){ System.out.println(“我喜欢说话”); } } }