阅读程序,写出其输出结果:import java.io.IOException;public class E{public static void main(String args[ ] ){int m =10;try{methodA( );m = 100;}catch(IOException e){m = 1000;}finally{m=99;}System.out.println(m);}public static void methodA( ) throws IOException{throw new IOException( );}}
查看答案
阅读程序,写出其输出结果:interface Com{int get(int a,int b);}public class E{public static void main(String args[ ]){Com com=(a,b)->{return a+b;};System.out.println(com.get(12,8));}}
阅读程序,写出其输出结果:interfaceSpeakHello{voidspeak();}classHelloMachine{publicvoidturnOn(SpeakHellohello){hello.speak();}}publicclassE{publicstaticvoidmain(Stringargs[]){HelloMachinemachine=newHelloMachine();machine.turnOn(()->{System.out.println("welcome!");});}}
创建一个多线程程序时可以通过实现类________, 也可以通过实现接口________
线程调度时要根据线程的优先级进行,线程的优先级可分为1 0 种,其中________代表优先级最高,_______ 代表优先级最低。