已知x,y=map(int,[’1’,’2’]),那么表达式x+y的值为()。
10. interface Foo { 11. int bar(); 12. } 13. 14. public class Beta { 15. 16. class A implements Foo { 17. public int bar() { return 1; } 18. } 19. 20. public int fubar( Foo foo) { return foo.bar(); } 21. 22. public void testFoo() { 23. 24. class A implements Foo { 25. public int bar() { return 2; } 26. } 27. 28. System.out.println( fubar( new A())); 29. } 30. 31. public static void main( String[] argv) { 32. new Beta().testFoo(); 33. } 34. } Which three statements are true?()
int I=1, j=0 switch(i) { case 2: j+=6; case 4: j+=1; default: j +=2; case 0: j +=4; } What is the value of j at line 16?()
55. int []x= {1, 2,3,4, 5}; 56. int y[] =x; 57. System.out.println(y[2]); Which is true?()
已知int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a;不能表示数组a中元素的式子是()
23.int z=5; 24. 25. public void stuff1(int x) { 26. assert (x> 0); 27. switch(x) { 28. case 2: x= 3; 29. default: assert false; } } 30. 31. private void stuff2(int y) { assert (y < 0); } 32. 33. private void stuff3() { assert (stuff4O); } 34. 35. private boolean stuff4() { z = 6; return false; } Which is true?()
35. String #name = “Jane Doe”; 36. int$age=24; 37. Double_height = 123.5; 38. double~temp = 37.5; Which two are true?()
已定义下列变量: int n; float f; double df; df=10; n=2; 下列语句正确的是()
1. class A implements runable ( 2. int i; 3. public void run () ( 4. try ( 5. thread.sleep(5000); 6. i= 10; 7. ) catch(InterruptedException e) {} 8. ) 9. ) 10. 11. public class Test { 12. public static void main (string args) ( 13. try ( 14. A a = new A (); 15. Thread t = new Thread (a); 16. t.start(); 17. 18. int j= a.i; 19. 20. ) catch (Exception e) {} 21. ) 22. ) Which statement al line 17 will ensure that j=10 at line 19?()
已知int a[]={ 0,2,4,6,8,10 },*p=a+1;其值等于0的表达式是()