企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 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 ```