![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.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...{
}