單項(xiàng)選擇題

class Parser extends Utils { 
public static void main(String [] args) {  
System.out.print(new Parser().getInt("42")); 
} 
int getInt(String arg) { 
return Integer.parseInt(arg); 
} 
} 
class Utils { 
int getInt(String arg) throws Exception { return 42; } 
} 
結(jié)果為:() 

A.42
B.編譯失敗
C.無(wú)輸出結(jié)果
D.運(yùn)行時(shí)異常被拋出

微信掃碼免費(fèi)搜題