freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

ocp題庫(kù)解析僅供參考-wenkub

2023-01-22 09:31:02 本頁(yè)面
 

【正文】 es。//[13, 14, 16] 14. (treeSet)。 10. subSet = (TreeSetInteger) (13, true, 16, true)。 7. TreeSetInteger subSet = new TreeSetInteger()。 看下面的例子,首先移除一個(gè) 15,發(fā)現(xiàn)原始的 treeSet和 subset里面的 15 都沒了,而 treeSet加上 15 之后,原始的 treeSet 和 subset 里面的 15 又都出現(xiàn)了。 21. (s + + subs)。 i 613。 : 12. import .*。 } 14. public N getMax() { return max。. C. Replace line 13 with for (int i : intList) {. D. Replace line 13 with for (Iterator iter : intList) {. E. Replace the method declaration with sum(Listint intList). F. Replace the method declaration with sum(ListInteger intList). Answer: A,C,F 考察把原始類型轉(zhuǎn)換成泛型。 ) { 14. int i = ((Integer)()).intValue()。QUESTION 1 a pregenerics implementation of a method: 11. public static int sum(List list) { 12. int sum = 0。 15. sum += i。則把 List 轉(zhuǎn)換成 ListInteger,由于類型參數(shù)不能為基本類型,所以 E 不正確,而第 13 行中 Iterator 轉(zhuǎn)換成 IteratorInteger, Integer 可以自動(dòng)裝箱和拆箱,所以第 14 行不需要。 } 15. public void add(N added) { 16. if (min == null || () ()) 17. min = added。 13. public class Explorer2 { 14. public static void main(String[] args) { 15. TreeSetInteger s = new TreeSetInteger()。 i++) 18. if(i%2 == 0) (i)。 22. } 23. } What is the result?A. Compilation fails. B. An exception is thrown at runtime. C. [608, 610, 612, 629] [608, 610] D. [608, 610, 612, 629] [608, 610, 629] E. [606, 608, 610, 612, 629] [608, 610] F. [606, 608, 610, 612, 629] [608, 610, 629] Answer: E 考察 TreeSet 以及它的 subSet 方法,兩個(gè) true 表示包括 608 和 611。 [java] view plain copy 1. package 。 8. for(int i = 10。 11. (subSet)。//[10, 11, 12, 13, 14, 16, 17, 18, 19, 20] 15. (15)。 3. public Score(int w, int l) { wins = w。 } 6. public String toString() { 7. return + wins + , + losses + 。 15. } 16. public int hashCode() { 17. return 420。 C 選項(xiàng): 向 HashSet 中插入另外一個(gè) Person 對(duì)象將會(huì)引起第二個(gè)對(duì)象覆蓋第一個(gè)對(duì)象 。錯(cuò)誤,由于 Person 對(duì)象的 hashCode 返回的值都是 420,所以 HashSet 中的 Person 對(duì)象都在一個(gè) bucket 中,組成了一條 entry 鏈表,查詢速度與 entry 鏈表的大小息息相關(guān)。 6. public class SortOf { 7. public static void main(String[] args) { 8. ArrayListInteger a = new ArrayListInteger()。 11. (a)。 15. } 16. } What is the result? A. [1, 2, 3, 5] B. [2, 1, 3, 5] C. [2, 5, 3, 1] D. [5, 3, 2, 1] E. [1, 3, 5, 2] F. Compilation fails. G. An exception is thrown at runtime. Answer: C (a)。 : 5. class Atom { 6. Atom() { (atom )。 15. } 16. public static void main(String[] a) { new Mountain()。如果刪除 16, 17, 18 行,由于局部?jī)?nèi)部類 A 在方法 testFoo()內(nèi)部屏蔽了外部的內(nèi)部類 A 可以看出不會(huì)對(duì)局部?jī)?nèi)部產(chǎn)生任何影響。 } 13. } 14. class Triangle { 15. public Triangle() { 16. // insert code here 17. } 18. } Which code, inserted at line 16, correctly retrieves a local instance of a Point object?A. Point p = () 。 Answer: D 在內(nèi)部類的外圍類外使用內(nèi)部類的時(shí)候,就像上面那個(gè) p = (new Line()).getPoint() 即 p = ()。 18. Beta b = (Beta)a。 the Exhibit button. Which statement is true about the classes and interfaces in the exhibit? A. Compilation will succeed for all classes and interfaces. B. Compilation of class C will fail because of an error in line 2. C. Compilation of class C will fail because of an error in line 6. D. Compilation of class AImpl will fail because of an error in line 2. Answer: C 考察多態(tài)性的動(dòng)態(tài)綁定,如果方法的簽名相同,則返回類型應(yīng)該 與超類的相同或是超類中返回類型的子類型 。 static { a=new int[2]。 D. static final int[] a。 } Answer: A,B 考察 static 修飾符。 C 錯(cuò)在既然你已經(jīng)用 { 100,200 }初始化了數(shù)組,就不能再定義維數(shù)了。 } 13. public void testFoo() { 14. fubar( 15. // insert code here 16. )。 } D. new class Foo { public int bar() { return 1。 5. (y[2][1])。 23. String s1 = 123。 B. (abc)。 D. (abc)。 F. (abc)。 H. (abc)。用來把字符串添加到 s 的尾部,并把結(jié)果返回給 str,注意 String 類型的變量是不變的, s并沒有變化。 12. public class DOS { 13. public static void main(String[] args) { 14. File dir = new File(dir)。 19. } catch (IOException e) { 。 : 11. class Converter { 12. public static void main(String[] args) { 13. Integer i = args[0]。 : 11. String test = Test A. Test B. Test C.。 C. String regex = .*。 Answer: E 正則表達(dá)式, String regex = \\.\\s*。 21. DateFormat df。 B. df = ()。 Answer: E getInstance()返回一個(gè) DateFormat 類型的對(duì)象, public static final DateFormat getInstance() Get a default date/time formatter that uses the SHORT style for both the date and the time. a class Repetition: 1. package utils。 B. static import utils.*。 F. import static 。//導(dǎo)入 Repetition 類中的 twice 靜態(tài)方法。s CLASSPATH is set (at login time) to:/usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar What is a possible location for the file? A. /test/ B. /home/bob/ C. /test/games/ D. /usr/lib/games/ E. /home/bob/games/ F. inside jarfile /opt/java/lib/ (with a correct manifest) G. inside jarfile /home/bob/downloads/ (with a correct manifest) Answer: C classpath 命令會(huì)把路徑動(dòng)態(tài)設(shè)置成 /test 和 /home/bob/downloads/*.jar,只能在這兩個(gè)路徑里搜索 ,由于在運(yùn)行的時(shí)候 classpath 后面是 ,所以肯定是games 包里面的 Chess 文件。 } 4. class Horse implements Animal { 5. Long weight = 1200L。 12. Icelandic i2 = new Icelandic()。 i2 = null。 現(xiàn)在考慮在 15 行的時(shí)候, i1 和 i3 都引用 B,而 i2 引用為 null,所以目前有 A 和 C 兩個(gè)對(duì)象沒有變量引用,所以這兩個(gè)對(duì)象是可以被回收的。 2 . public class SomeApp { 3. public static void main(String[] args) { 4. byte[] bytes = new byte[256] 。 D. (bytes) 。 : 11. public class ItemTest { 12. private final int id。 18. (69)。 16. Pass p = new Pass()。 23. } 24. } What is the result?A. Compilation fails. B. An exception is thrown at runtime. C. doStuff x = 6 main x = 6 D. doStuff x = 5 main x = 5 E. doStuff x = 5 main x = 6 F. doStuff x = 6 main x = 5 Answer: D 函數(shù)參數(shù)的不可變性,不能改變基本類型的參數(shù),但可改變對(duì)象的狀態(tài)。 6. doSomethingElse(o)。 10. } 11. } When the doSomething method is called, after which line does the Object created in line 5 bee available for garbage collection? A. Line 5 B. Line 6 C. Line 7 D. Line 8 E. Line 9 F. Line 10 Answer: D 一共有兩次通過 n
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1