試卷名稱:106年 - 106年中鋼新進人員-資訊工程(師級)-1.程式設計2.資料庫系統3.資訊網路工程4.計算機結構#96663
年份:106年
科目:1.程試設計;2.資料庫系統;3.資訊網路工程;4.計算機結構
31. 參考下面 JAVA 片段程式碼,選項中的方法何者放在 class B 不會產生編譯錯誤
(A)public int getQuotient (int i) throws ArithmeticException{return 20/i;}
(B)public double getQuotient (double d1, double d2) throws ArithmeticException{return d1/d2;}
(C)public int get (int i, int j) throws RuntimeException {return i/j;}
(D)public int getQuotient (int d1, int d2) {return d1/d2;}