A.該類有一個(gè)返回類型為 int 的 equals 方法。 B.該類有一個(gè)返回類型為 boolean 的 equals 方法。 C.該類有一個(gè)接收一個(gè)參數(shù)的 equals 方法。 D.該類有一個(gè)接收兩個(gè)參數(shù)的 equals 方法。
class Flow { public static void main(String [] args) { try { System.out.print("before "); doRiskyThing(); System.out.print("after "); } catch (Exception fe) { System.out.print("catch "); } System.out.println("done "); } public static void doRiskyThing() throws Exception { // this code returns unless it throws an Exception } } 可能會(huì)產(chǎn)生下面哪兩項(xiàng)結(jié)果?()
A.before B.before catch C.before after done D.before catch done
1. import java.util.*; 2. 3. Class FindStuff { 4. public static void main(String [] args) { 5. // insert code here 6. c.put("x", 123); 7. } 8. } 分別插入到第5行,哪三行允許代碼編譯?()
A.Map c = new SortedMap(); B.HashMap c = new HashMap(); C.HashMap c = new Hashtable(); D.SortedMap c = new TreeMap();