你能在内部类中调用方法而不在类中调用构造函数吗?A我的代码:
public class A {
public A() {
System.out.println("You are in Class A");
}
public class innerA {
public innerA() {
System.out.println("You Are in Class InnerA");
}
public void PrintName() {
System.out.println("Jack in InnerA");
}
}
}
public class B {
A.innerA obj = new A().new innerA();
}
qq_遁去的一_1
浮云间
守着一只汪
随时随地看视频慕课网APP
相关分类