package Demo;
public class Outer {
private int id=10;
public void out (){
System.out.println("这是外部类的方法");
}
class Inner{
public void in(){
System.out.println("这是内部类的方法");
}
public void getID(){
System.out.println(id);
}
}
}
package Demo;
public class sss {
public static void main(String[] args) {
Outer outer = new Outer();
Outer.Inner inner = outer.new Inner();
inner.in();
inner.getID();
}
}