java 子类 抽象类 接口
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 interface A{
2 public String AUTHER="Mihchael";
3 public void print();
4 public String getInfo();
5 }
6 abstract class B{
7 public abstract void say();
8 }
9 class X extends B implements A{
10 public void say(){
11 System.out.println("Hello,World!!");
12 }
13 public void print(){
14 System.out.println("作者:"+AUTHER);
15 }
16 public String getInfo(){
17 return "Hello";
18 }
19 }
20 public class test1 {
21 public static void main(String args[]){
22 X x=new X();
23 x.print();
24 x.say();
25 }
26 }
继承抽象类实现接口格式
class 子类 extends 抽象类 implements 接口A,接口B...{
}