答案 0 :(得分:2)
您可以使用Enclosing type
选项添加nested class
例如com.A类,将其添加为新B类的封闭类型
它将创建一个嵌套的类B
public class A {
private static class B {
}
}
中查看更多
封闭类型选择此选项可以选择用于封闭新类的类型。
答案 1 :(得分:0)
<pre>
So in this case where java file is created inside the existing java file .like
where we selected the Test1 as Enclosing type and Test2 is the new java class file.
public class Test1 {
public class Test2 {
}
public static void main(String[] args) {
System.out.println("simple its the part of the class Test1");
}
}
</pre>