摘要: 接口增加的新特性 *1.定义格式 interface 接口名{ //final常量 //抽象方法 static 方法类型 方法名(){ 方法体 } default 方法类型 方法名(){ //方法体 } } *2.方法的实现 当一个类实现一个接口的时候,这个类的对象可以调用接口的default方法, 阅读全文
posted @ 2020-11-04 22:49 hahachch 阅读(58) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-10-22 22:32 hahachch 阅读(53) 评论(0) 推荐(0)