当前位置:SCJP程序员认证考试题库

问题:

[单选]

23. Object [] myObjects = { 
24. new integer(12), 
25. new String(”foo”), 
26. new integer(5), 
27. new Boolean(true) 
28. }; 
29. Arrays.sort(myObjects); 
30. for( int i=0; i31. System.out.print(myObjects[i].toString()); 
32. System.out.print(” “); 
33. } 
What is the result?() 

 

A .  Compilation fails due to an error in line 23.
B .  Compilation fails due to an error in line 29.
C .  A ClassCastException occurs in line 29.
D .  A ClassCastException occurs in line 31.
E .  The value of all four objects prints in natural order.

煤层形成时期的沉积环境对煤层的形态和煤层厚度有直接的关系。 在法定计量单位书写中,频率的正确单位符号是()。 HZ。 Hz。 hz。 hZ。 音乐制作的关键经验有动作制作、歌唱、和()。 下列关于文学常识的表述,不正确的一项是()。 “讽”和“骚”是《诗经》和《楚辞》的代称,是我国现实主义和浪漫主义文学的源头。。 《春秋》、《诗经》、《尚书》、《礼记》、《周易》统称为“五经”,是儒家经典著作。。 苏武是北宋文学家、书画家,他的词开豪放一派,《念怒娇。赤壁怀古》是其代表作。。 《红楼梦》、《水浒传》、《三国演义》、《聊斋志异》有“中国古典长篇小说四大部”之称。。 建安七子

23. Object [] myObjects = { 
24. new integer(12), 
25. new String(”foo”), 
26. new integer(5), 
27. new Boolean(true) 
28. }; 
29. Arrays.sort(myObjects); 
30. for( int i=0; i31. System.out.print(myObjects[i].toString()); 
32. System.out.print(” “); 
33. } 
What is the result?() 

 

参考答案:

  参考解析

本题暂无解析

在线 客服