20172333 2017-2018-2 "Java Programming" 10th Week study Summary
Textbook Learning Content
13th Chapter
- A collection is an object, a database that holds other objects.
- Collections can hold different kinds of objects and can hold objects of the same type, which are divided into heterogeneous and isomorphic.
- Generics are a feature of programming languages. Allows programmers to define variable parts when writing code in a strongly typed programming language, which must be specified before they are used.
Problems in code debugging and the resolution process
- [x] Issue 1: During the writing of PP11.2, the Try-catch statement is placed under the while statement although the exception is successfully caught, but the while statement cannot be looped. Figure
- resolution Process : Later examining found not to use while loop, but after doing it can quit the teaching materials learning problems and the solution process
- [x] question 1: What is the relationship between generics and the Java Collection Class API?
- workaround : Generics are primarily used to define sets of undefined types in a collection class, preventing objects of different types in a collection
- [x] Question 2: The difference between hashcode () and Equals ()
resolution process : Figure
Code Hosting
(run result of statistics.sh script)
Last week's summary of the wrong quiz
A recursive method without a base case leads to infinite recursion.:
A. True
B. False
Answer: A, I choose b.
Parsing: If you do not process the end of the loop, it will result in recursive infinite loops.
2.The following method correctly adds-ints, returning their sum:
public int Add (int a, int b)
{
return (b > 0)? Add (A+1, b-1): A;
}:
A. True
B. False
Answer: B, I chose a.
Parse: Failed when b<0.
The following method correctly multiplies, ints so long as both is non-negative:
public int mpy (int a, int b)
{
return (b > 0)? A + mpy (A, b-1): 0;
}:
A. True
B. False
Answer: A I chose B.
Parse: As long as these two are not negative, you can run normally.
Comments:
After encountering the problem, the data review and related changes, it is worth my study.
- Something worth learning or doing in your code:
The notes are organized and organized when you make Git commit.
reviewed the classmates blog and code
- This week's study of the knot
- 20172330 Linan
- Pair of photos
- Pairs of learning content
- Rich commit content worth learning
- The problem and the method of handling records are concise and clear.
Learning progress Bar
|
lines of code (new/cumulative) |
Blog Volume (Add/accumulate) |
Learning Time (new/cumulative) |
Important Growth |
Goal |
5000 rows |
30 Articles |
400 hours |
|
First week |
125/125 |
2/2 |
20/20 |
|
Second week |
269/394 |
2/4 |
Unknown/38 |
|
Third week |
477/920 |
1/5 |
x/x |
|
Week Four |
1179/2338 |
1/6 |
-- |
|
Week Five |
1131/3154 |
1/7 |
? /? |
|
Week Six |
1448/4008 |
1/8 |
? /?? |
|
Seventh Week |
957/4840 |
2/10 |
? /??? |
|
Eighth Week |
1093/5933 |
2/12 |
? /???? |
|
Nineth Week |
739/6672 |
2/14 |
|
Tenth Week |
702/7374 |
1/15 |
|
Other (sentiment, thinking, etc., optional)
No
Resources
Errors and exceptions, the difference between the two is introduced
Java Try-catch and looping issues
20172333 2017-2018-2 "Java Programming" 10th Week study Summary