类B实现了接口的抽象方法,那不是应该是抽象类B?怎么不加抽象也能运行?
interface It{int i = 1;
void f();
}
interface It1 extends It{
int j =2;
void g();
}
class B implements It,It1{
public void f(){
System.out.println("AAAA");
}
public void g(){
System.out.println("bbbb");
}
class A extends B{
}
}
class WW{
public static void main(String[] args){
A aa = new A();
aa.f();
aa.g();
System.out.println(aa.i);
System.out.println(aa.j);
}
}