abstract class MyClass{
static class StaticClass{
public void showAdd(){
System.out.println(" show add");
}
}
}
public class SampleClass extends MyClass{
public static void main(String[] args){
MyClass myClass = new SampleClass();
MyClass.StaticClass staticClass = new MyClass.StaticClass();
staticClass.showAdd();
}
}
输出如预期的那样正确,但我们如何用抽象类编写新的?