JAVA8 十大新特性詳解

1、接口的默認方法 在接口中新增了default方法和static方法,這兩種方法能夠有方法體 一、static方法 示例代碼:php public interface DefalutTest { static int a =5; default void defaultMethod(){ System.out.println("DefalutTest defalu
相關文章
相關標籤/搜索