Files
javaSE-260914/day10/src/com/inmind/interface_abstract01/MyInterface.java
T

12 lines
379 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.interface_abstract01;
/*
接口中抽象方法定义:
public abstract 返回值类型 抽象方法名();
但凡在接口中定义一个没有方法体{}的方法,就是public abstract修饰;暂时不省略
;
*/
public interface MyInterface {
public abstract void method();
void method1();//编译器,前面会自动加上 public abstract
}