JAVA学习 Interface

1. 声明interface时,interface中的声明默认为Public,因此在生命时可以忽略public。

2. An interface can contain constant declarations. All constant values defined in an interface are implicitly publicstatic, and final. Once again, you can omit these modifiers. 一个接口能够含有常量声明,在接口中声明的所有常量默认是公共、静态和最终的。因此可以忽略这些修饰符。

3. Users who have classes that implement interfaces enhanced with new default or static methods do not have to modify or recompile them to accommodate the additional methods. 使用default 和 static 扩展接口方法时,已经在类中引用的此接口不需要修改或者重新编译去引用附加的接口方法。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值