![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-56/ti_inject-812ce.png)
运行下面的写出运行结果,体会内部类的形式 //定义外部类Outer class Outer20 { static int m = 0; // 定义外部类静态变量m static class Inner { void show() { // 静态内部类访问外部类静态成员 System. out .println( "外部类静态变量m=" + m ); } } } //定义测试类 public class Ex20OI { public static void main(String[] args ) { // 静态内部类可以直接通过外部类创建 Outer20.Inner inner = new Outer20.Inner(); inner .show(); } }