try { if ((new Object))(.equals((new Object()))) { System.out.println(“equal”); }else{ System.out.println(“not equal”); } }catch (Exception e) { System.out.println(“exception”); } What is the result? ()
55. int []x= {1, 2,3,4, 5}; 56. int y[] =x; 57. System.out.println(y[2]); Which is true?()
int i = 1,j = 10; do{ if (i>j) { continue; } j--; } while (++i <6); System.out.println(“i = “ +i+” and j = “+j); What is the result?()
try { int x = 0; int y = 5 / x; } catch (Exception e) { System.out.println(“Exception”); } catch (ArithmeticException ae) { System.out.println(“Arithmetic Exception”); } System.out.println(“finished”); What is the result?()
如下代码: public void Test() { try { oneMethod(); System.out.println("condition 1"); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("condition 2"); } catch(Exception e) { System.out.println("condition 3"); } finally { System.out.println("finally"); } } 如果oneMethod正常运行,则输出结果中是?()
int x = 3; int y = 1; if (x = y) { System.out.println(“x = “ + x); } What is the result? ()
System.out.println(Math.sqrt(-4D)); What is the result?()
为了使得System.out.println()输出对象引用的时候得到有意义的信,我们应该覆盖Object t{-的哪个方法?()
12. void start() { 13. A a = new A(); 14. B b = new B(); 15. a.s(b); 16. b = null; 17. a = null; 18. System.out.println(“start completed”); 19. } When is the B object, created in line 14, eligible for garbage collection?()
为了使得System.out.println()输出对象引用的时候得到有意义的信息,我们应该覆盖Object中的哪个方法?()