protected
修飾符,一種可見性修飾符,當一個變量或者方法聲明爲protected
可見性時,就能夠被子類所引用。不光如此,同一個包裏的其餘任何類也可使用。super
引用,相似this
引用,使用super
引用能夠調用父類的構造方法。可見性究竟是什麼
書上講的不甚詳細,百度一下也不知所云,找了很久,找到這麼一句話html
可見性體現了方法和實例變量對其餘類和包的訪問控制git
也就是說,這個屬性決定了這個方法或變量能被哪一種類引用?又有下圖:
這下就理解的稍微好一點了程序員
問題1:全部的硬幣面值必定相同,這顯然不對勁,單個讀取時甚至出現了
-1
數組
問題1解決方案:初步檢查:代碼中發現BUG,誤用
indexof()
,應該使用get()
纔對。
可是尚未徹底解決
面值相同的問題依然存在,因而我在其中加入了一個face
的從新隨機操做問題迎刃而解。
數據結構
(statistics.sh腳本的運行結果截圖)學習
錯題1: In Java, arrays are
正確答案:B .objects
緣由:英語水平太低。this
錯題2:If x is a char, and values is an int array, then values[x]
正確答案:D .casts x as an int based on x's ASCII value (for instance, if x is 'a' then it uses 97 and if x is 'z' then it uses 122)
緣由:數組索引若是是char
,按照ASCII碼錶對應數字取int
值命令行
錯題3:If a and b are both int arrays, then a = b; will
正確答案:A .create an alias
緣由:理解錯誤,誤覺得二者相同就是將b中的全部對象複製到a中去。設計
錯題4:When comparing any primitive type of variable, == should always be used to test to see if two values are equal.
正確答案:B .false
緣由:對於浮點型不能這樣使用。3d
錯題5:A Java main method uses the parameter (String[ ] variable) so that a user can run the program and supply "command-line" parameters. Since the parameter is a String array, however, the user does not have to supply any parameters.
正確答案:A .true
緣由:程序員(操做者)能夠不輸入命令行參數,咱們日常就沒有輸入。
代碼行數(新增/累積) | 博客量(新增/累積) | 學習時間(新增/累積) | 重要成長 | |
---|---|---|---|---|
目標 | 5000行 | 30篇 | 400小時 | |
第一週 | 195/195 | 1/4 | 20/20 | 對代碼產生了很大興趣 |
第二週 | 309/504 | 1/5 | 20/40 | 打字速度明顯提高 |
第三週 | 311/815 | 2/7 | 25/65 | 無 |
第四周 | 474/1289 | 1/8 | 30/95 | 抗...抗壓能力增強? |
第五週 | 260/1549 | 1/9 | 15/110 | 瞭解到預習的重要性 |
第六週 | 358/1907 | 2/11 | 20/130 | 打字速度明顯提高 |
第七週 | 780/2687 | 2/13 | 15/145 | 學會使用JUnit |
(在博客下評論)