在Java中,实现继承的方式有以下几种:
例如:class SubClass extends SuperClass
class SubClass extends SuperClass
例如:class SubClass implements Interface1, Interface2
class SubClass implements Interface1, Interface2
例如:class SubClass extends AbstractClass
class SubClass extends AbstractClass
例如:interface Interface3 extends Interface1, Interface2
interface Interface3 extends Interface1, Interface2