interface3.java

来自「数据结构(java描述)课件(第三讲:树结构)」· Java 代码 · 共 25 行

JAVA
25
字号
interface Interface3MyInter1{
  public void method1();
}
interface Interface3MyInter2{
  public void method2();
}
class Interface3MyClass{
  public void hi(){
  	System.out.println("你好");
  }
}
public class Interface3 extends Interface3MyClass implements Interface3MyInter1, Interface3MyInter2{
  public void method1(){
  	System.out.println("method1 override");
  }
  public void method2(){
  	System.out.println("method2 override");
  }
  public static void main(String[] args){
    Interface3 ob=new Interface3(); 
    ob.method1();
    ob.method2();
    ob.hi();
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?