内部类Java 代码实现

public class OuterClass {
    private int x;
    
    public class InnerClass {
        public void doSomething(){
            System.out.println(x);
        }
    }
}

 

posted @ 2023-02-12 21:56  八英里  阅读(10)  评论(0编辑  收藏  举报