學號 2017-2018-20172309 《程序設計與數據結構》第4周學習總結
學號 2017-2018-20172309 《程序設計與數據結構》第4周學習總結
教材學習內容總結
盡量簡單的總結一下本周學習內容
盡量不要抄書,浪費時間
看懂就過,看不懂,學習有心得的記一下
教材學習中的問題和解決過程
- 問題1:XXXXXX
- 問題1解決方案:XXXXXX
- 問題2:XXXXXX
- 問題2解決方案:XXXXXX
- ...
代碼調試中的問題和解決過程
- 問題1:XXXXXX
- 問題1解決方案:XXXXXX
- 問題2:XXXXXX
- 問題2解決方案:XXXXXX
- ...
代碼托管
(statistics.sh腳本的運行結果截圖)
上周考試錯題總結
錯題1及原因,理解情況:
If two variables contain aliases of the same object then
A . the object may be modified using either alias
B . the object cannot be modified unless there‘s but a single reference to it
C . a third alias is created if/when the object is modified
D . the object will become an "orphan" if both variables are set to null
E . answers A and D are correct正確答案:E 我的答案:A
錯誤原因:選項沒有看完,導致沒有選D。錯題2及原因,理解情況
What happens if you attempt to use a variable before it has been initialized?
A . A syntax error may be generated by the compiler
B . A runtime error may occur during execution
C . A "garbage" or "uninitialized" value will be used in the computation
D . A value of zero is used if a variable has not been initialized
E . Answers A and B are correct正確答案:E 我的答案:B
錯誤原因:沒有正確的認識語法錯誤,語法錯誤就是編輯時的錯誤,俗稱病句。錯題3及原因,理解情況:
What is the function of the dot operator?
A . It serves to separate the integer portion from the fractional portion of a floating point number
B . It allows one to access the data within an object when given a reference to the object
C . It allows one to invoke a method within an object when given a reference to the object
D . It is used to terminate commands (much as a period terminates a sentence in English)
E . Both B and C are correct正確答案:E 我的答案:B
錯誤原因:在課本上只看到了C的相關語句,所以直接選了C錯題4及原因,理解情況:
Consider the following two lines of code. What can you say about s1 and s2?!
String s1 = "testing" + "123";
String s2 = new String("testing 123");
A . s1 and s2 are both references to the same String object
B . the line declaring s2 is legal Java; the line declaring s1 will produce a syntax error
C . s1 and s2 are both references to different String objects
D . s1 and s2 will compare "equal"
E . none of the above正確答案:C 我的答案:B
錯誤分析:以為S1是錯誤的語法,後來才發現沒有問題。回去後直接試了下發現它們都是對的。錯題5及原因,理解情況:
The String class‘ compareTo method
A . compares two string in a case-independent manner
B . yields true or false
C . yields 0 if the two strings are identical
D . returns 1 if the first string comes lexically before the second string
E . none of the above正確答案:C 我的答案:D
錯誤分析:沒有正確理解題目的意思,我的理解為:“class”與“method”相比。題目的意思為:“使用String類char compareTo()方法的輸出。輸出規則是:按照字典順序+0-分別表示先於、等於、後於STr字符串。
其他(感悟、思考等,可選)
xxx
xxx
學習進度條
代碼行數(新增/累積) | 博客量(新增/累積) | 學習時間(新增/累積) | 重要成長 | |
---|---|---|---|---|
目標 | 5000行 | 30篇 | 400小時 | |
第一周 | 075/200 | 1/1 | 05/20 | |
第二周 | 560/500 | 2/2 | 18/38 | |
第三周 | 972/1000 | 4/4 | 39/60 | |
第四周 | /1300 | 2/9 | 30/90 |
參考文獻
1.Java語言中的錯誤
2.
3.
學號 2017-2018-20172309 《程序設計與數據結構》第4周學習總結