Files
javaSE-0113/day10/src/com/inmind/interface01/MyInterface.java

13 lines
420 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.inmind.interface01;
/*
接口中抽象方法定义:
public abstract 返回值类型 抽象方法名();
但凡在接口中定义一个没有方法体{}的方法就是public abstract修饰暂时不省略
*/
public interface MyInterface {
public abstract void method();//抽象方法
public abstract void method1();//抽象方法
int method2();//省略了public abstract 的抽象方法
}