JAVA8 十大新特性详解_java8新特性-CSDN博客

网站介绍:文章浏览阅读4.5w次,点赞47次,收藏400次。一、接口的默认方法在接口中新增了default方法和static方法,这两种方法可以有方法体 1、static方法 示例代码:public interface DefalutTest { static int a =5; default void defaultMethod(){ System.out.println("DefalutTest defalut 方法_java8新特性