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

正文內(nèi)容

20xx【整理最全的java筆試題庫之選擇題篇】國企筆試題庫(編輯修改稿)

2025-01-16 23:16 本頁面
 

【文章內(nèi)容簡介】 o instances of the same class (Choose two) A. If the hashCode values are different, the objects might be equal. B. If the hashCode values are the same, the object must be equal. C. If the hashCode values are the same, the objects might be equal. D. If the hashCode values are different, the objects must be unequal. 解答:CD 先通過hashcode來判斷某個(gè)對(duì)象是否存放某個(gè)桶里,但這個(gè)桶里可能有很多對(duì)象,那么我們就需要再通過equals 來在這個(gè)桶里找到我們要的對(duì)象。
31. What is the numerical range of a char A. 0 32767 B. 0 65535 C. –256 255 D. –32768 32767 E. Range is plat dependent. 解答:B 在Java中,char是一個(gè)無符號(hào)16位類型,取值范圍為0到65535。
32. Given: public class Test { private static float[] f = new float[2]。 public static void main(String args[]) { (“f[0] = “+ f[0])。 } } What is the result A. f[0] = 0 B. f[0] = C. Compilation fails. D. An exception is thrown at runtime. 解答:B 33. Given: public class Test { public static void main(String[] args) { String str = NULL。 (str)。 } } What is the result A. NULL B. Compilation fails. C. The code runs with no output. D. An exception is thrown at runtime. 解答:B null應(yīng)該小寫 3Exhibit: class X implements Runnable { 2. private int x。 3. private int y。 4. public static void main(String [] args) { 5. X that = new X()。 6. (new Thread(that)).start()。 7. (new Thread(that)).start()。 8. } 9. public synchronized void run( ){ 10. for (。) { 11. x++。 12. y++。 13. (“x = “+ x + “, y = “+ y)。 14. } 15. } 16.} What is the result A. An error at line 11 causes pilation to fail. B. Errors at lines 7 and 8 cause pilation to fail. C. The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”) D. The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1”followed by “x=1, y=1”) E. The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1”followed by “x=2, y=2”) 解答:E 多線程共享相同的數(shù)據(jù),使用synchronized實(shí)現(xiàn)數(shù)據(jù)同步。
3Which two CANNOT directly cause a thread to stop cuting (Choose Two) A. Existing from a synchronized block. B. Calling the wait on an object. C. Calling notify on an object. D. Calling read on an Stream object. E. Calling the SetPriority on a Thread object. 解答:AD ,包括run方法。當(dāng)一個(gè)線程停止時(shí)候,他會(huì)立即釋 放所有他鎖住對(duì)象上的鎖。這會(huì)導(dǎo)致對(duì)象處于不一致的狀態(tài)。當(dāng)線程想終止另一個(gè)線程的時(shí) 候,它無法知道何時(shí)調(diào)用stop是安全的,何時(shí)會(huì)導(dǎo)致對(duì)象被破壞。所以這個(gè)方法被棄用了。你應(yīng) 該中斷一個(gè)線程而不是停止他。被中斷的線程會(huì)在安全的時(shí)候停止。
3Which two statements are true regarding the creation of a default constructor (Choose Two) A. The default constructor initializes variables. B. The default constructor invokes the noparameter constructor of the superclass. C. The default constructor initializes the instance variables declared in the class. D. If a class lacks a noparameter constructor, but has other constructors, the piler creates a default constructor. E. The piler creates a default constructor only when there are no other constructors for the class. 解答:CE 構(gòu)造方法的作用是實(shí)例化對(duì)象的時(shí)候給數(shù)據(jù)成員初始化,如果類中沒有顯示的提供構(gòu)造方法,系統(tǒng)會(huì)提供默認(rèn)的無參構(gòu)造方法,如果有了其它構(gòu)造方法,默認(rèn)的構(gòu)造方法不再提供。
3Given: public class OuterClass { private double d1 = 。 //insert code here } You need to insert an inner class declaration at line2. Which two inner class declarations are valid (Choose Two) A. static class InnerOne { public double a() {return d1。} } B. static class InnerOne { static double a() {return d1。} } C. private class InnerOne { public double a() {return d1。} } D. protected class InnerOne { s
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1