interface A{
void aa();
}
//没有错误,可以通过编译,并且实现。
interface B extends A{
void bb();
}
//语法出错:The type MainActivity.B cannot be the superclass of c; a superclass must be a class
class C extends B{
}
//没有错误,可以通过编译。
abstract class D implements B{
}
//语法出错:The type MainActivity.B cannot be the superclass of E; a superclass must be a class
abstract class E extends B{
}
继承规则:类继承类,接口继承借口。
void aa();
}
//没有错误,可以通过编译,并且实现。
interface B extends A{
void bb();
}
//语法出错:The type MainActivity.B cannot be the superclass of c; a superclass must be a class
class C extends B{
}
//没有错误,可以通过编译。
abstract class D implements B{
}
//语法出错:The type MainActivity.B cannot be the superclass of E; a superclass must be a class
abstract class E extends B{
}
继承规则:类继承类,接口继承借口。