示例代码是:-
import javax.sound.midi.*;
import java.io.*;
class test{
public void go() throws MidiUnavailableException{
//try{
Sequencer sequencer = MidiSystem.getSequencer();
System.out.println("Got it");
//}
/*catch(Exception ex){
System.out.println("Size Matters");
}*/
/*catch(MidiUnavailableException ex){
System.out.println("I am the incorrect exception");
}*/
}
public static void main(String [] args) throws MidiUnavailableException{
test obj = new test();
//try{
obj.go();
//}
/*catch(MidiUnavailableException mex){
System.out.println("Compiler should catch me");
}*/
}
}
编译代码时我没有得到任何信息;这是否意味着JVM会处理这种情况下的异常?或者如果系统无法提供定序器,那么我的程序将终止?