🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 1-12.内部类的实现方式? ``` 答:示例代码如下: package test; public class OuterClass { private class InterClass { Public Interlass() { System.out.println("InterClass Create"); } } public OuterClass() { InterClass ic = new InterClass(); System.out.println("OuterClass Create"); } public static void main(String[] args) { OuterClass oc = new OuterClass(); } } 输出结果: C:>java test/OuterClass InterClass Create OuterClass Create ```