题目内容

请简述@FunctionalInterface注解的作用。

查看答案
更多问题

请写出Lambda表达式的基本语法格式。

写出创建静态内部类对象的基本语法格式。

简述thorws的作用。

阅读下面的程序,分析代码是否能够编译通过,如果能编译通过,请列出运行的结果并分析出现此结果的原因。否则请说明编译失败的原因。class Cat{void mi( ) throws NullPointerException{System.out.println( "Cat mi mi .. " );} } public class SmallCat extends Cat{void mi( ) throws Exception{System.out.println( "SmallCat mi mi .. " );}public static void main( String[] args ) throws Exception{Cat cat = new SmallCat();cat.mi();} }

答案查题题库