0
說我有一個接口FirstInterface如下:差Vs不使用抽象關鍵字
public interface FirstInterface {
public void myInterfaceMethod();
}
這裏我聲明的方法myInterfaceMethod(),這將在被定義將實現此接口的類。
,但我還可以做
public interface FirstInterface {
public abstract void myInterfaceMethod();
}
我已經加入方法聲明關鍵字抽象。 我想知道,如果有的話,它是否有任何區別在方法聲明中添加抽象關鍵字?