The instance gets garbage collected.
The code on line 33 throws an exception.
The code on line 35 throws an exception.
The code on line 31 throws an exception.
The code on line 33 executes successfully.
第1题:
A.public int compareTo(Object o){/*more code here*/}
B.public int compareTo(Score other){/*more code here*/}
C.public int compare(Score s1,Score s2){/*more code here*/}
D.public int compare(Object o1,Object o2){/*more code here*/}
第2题:
Here are some _______(信) for you,Jane!
第3题:
Do you have ______ shrimps? ---Here they ______ .
A、any,are
B、some,is
C、any,be
D、some,are
第4题:
31. // some code here 32. try { 33. // some code here 34. } catch (SomeException se) { 35. // some code here 36. } finally { 37. // some code here 38. } Under which three circumstances will the code on line 37 be executed?()
第5题:
class One { void foo() {} } class Two extends One { //insert method here } Which three methods, inserted individually at line 14, will correctly complete class Two?()
第6题:
A、to design
B、designing
C、designed
D、design
第7题:
1. public class a { 2. public void method1() { 3. try { 4. B b=new b(); 5. b.method2(); 6. // more code here 7. } catch (TestException te) { 8. throw new RuntimeException(te); 9. } 10. } 11. } 1. public class b { 2. public void method2() throws TestException { 3. // more code here 4. } 5. } 1. public class TestException extends Exception { 2. } Given: 31. public void method() { 32. A a=new a(); 33. a.method1(); 34. } Which is true if a TestException is thrown on line 3 of class b?()
第8题:
Here are a few apples. Would you like to have _____________?
A、ones
B、some ones
C、one
第9题:
33. try { 34. // some code here 35. } catch (NullPointerException e1) { 36. System.out.print(”a”); 37. } catch (RuntimeException e2) { 38. System.out.print(”b”); 39. } finally { 40. System.out.print(”c”); 41. } What is the result if a NullPointerException occurs on line 34?()
第10题:
public class Team extends java.util.LinkedList { public void addPlayer(Player p) { add(p); } public void compete(Team opponent) { /* more code here */ } } class Player { /* more code here */ } Which two are true?()