标签:main oid pre int static code this ring turn
public class DotThis { //内布类 public class Inner { public int outer(int a ,int b) { return a+b; }; } //调用内部类 public static void main(String[] args) { Inner inner = new DotThis().new Inner();
System.out.print(inner.outer(1, 2)); } }
在main函数里面调用new 内部类必须是由主类调用的!!!!!
标签:main oid pre int static code this ring turn
原文地址:https://www.cnblogs.com/zxrxzw/p/12395395.html