public abstract interface ????<转载>

public abstract interface 等效于 public interface

public interface 为隐式申明

在JDK文档中提到:

1>Think of an interface as a 100-percent abstract class.

2>深入的描述:

Typing in the abstract modifier is considered redundant; interfaces are implicitly abstract whether you type abstract or not. You just need to know that both of these declarations are legal, and functionally identical:

public abstract interface Rollable { }
public interface Rollable { }

The public modifier is required if you want the interface to have public rather than default access.

一句话描述: 在Interface申明时含不含abstract都一样!

//以下为错误描述//

abstract interface 和单纯的interface的区别是:

   Class 和 Class 之间是 extends

InterfaceInterface 之间是 extends

Class 和 Interface 之间是 implements

Interface 和 abstract Interface 之间仅仅只能被你自己定义的接口extends,不可能implements, implements是Class和Interface之间的"专利"

一句话 就是 abstract interface 只能被interface继承,不能直接被类实现

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值