单项选择题 现有 classParserextendsUtils{ publicstaticvoidmain(String[]args){ try{System.out.print(newParser().getlnt("42")) }catch(Exceptione){ System.out.println("Exc");} } intgetlnt(Stringarg)throwsException{ returnInteger.parselnt(arg); } } classUtils{ intgetlnt(){return42;} } 结果是什么?()
单项选择题 现有: 1. class Propeller2 { 2. pulolic static void main (String[]args)//add code here? 3. { new Propeller2().topGo(); } 4. 5.void topGo() //add code here? 6. { middleGo(); } 7. 8.void middleGo() //add code here? 9. { go(); System.out.println ("late middle"); } void go() //add code here? 12. {throw new Exception(); } 13. } 为使代码通过编译,需要在哪一行加入声明throws Exception?()
单项选择题 现有: class Parser extends Utils { public static void main (String[] args) { try{System.out.print (new Parser().getlnt("42")); } catch (Exception e) { System.out.println("Exc"); } } int getlnt (String arg) throws Exception { return Integer.parselnt (arg); } class Utils { int getlnt (String arg) {return 42; } } 结果为()