Summary of learning contents of textbook
• Understanding Clothes C1 = new Clothes ();
• The construction method determines how the class generates the object: this, new
The difference between == and equals: = = comparison is the address of the comparison object, and equals is logically equal
• Basic types of Packaging: Int-integer, Long-long, Byte-byte, Float-float, double-double, Boolean-boolean 、...
· String/stringbuffer/stringbuilder
• Learn to use the Java API, under Windows must download the CHM Format Java API, this version has a retrieval function, very convenient to use.
• Encapsulation (encapsulation) actually uses methods to hide the data of the class, control how much the user modifies and accesses the data, hide the object details, and manipulate the object as a black box:
① encapsulating the initialization process by means of a constructor (constructor)
② encapsulating operations through member methods (functions)
③ encapsulating data through member variables
• Class Syntax: Usage of public, private, this and super, final, static, import static
Problems in teaching materials learning and the solving process
• Question: Textbook page 86, guess code, guess numbers, don't know if you didn't set good one number, why you can guess a number between 0-9
Answer: Baidu (Math.random ()10) The meaning of this line of code, Know (Math.random ()) means that the [0,1] randomly produces a number,10, so it becomes [0,10] randomly produces a number between, So you can guess the numbers.
· Integercache.low default value is -128,integercache.high the default value is 127 (this is not a problem, but once the wrong range)
• Question: True and false determine whether it is ture or false according to the code, this problem is not resolved
• Question: The meaning of%2d
Answer: Baidu learned that the output is a fixed bit width of 2 bits
Problems in code debugging and the resolution process
Did not notice that the char corresponds to a single letter, so when you start typing Wang and Li, you get an error.
The second one is the difference between%n and \ n when outputting fractions.
Other (sentiment, thinking, etc., optional)
• After-school exercises can be done two or three times, especially in the wrong, to help memory and understanding
• Pay attention to print and printf and println when you hit the code
• When naming, be careful not to use exactly the same words as the relevant variables
Another code is not hosted on Git ...
Learning progress Bar
|
Number of lines of code |
Study time |
Number of Blogs |
Important growth |
Goal |
4000 rows |
300h |
002 |
|
First week |
100/100 |
5/5 |
2/2 |
|
Second week |
130/230 |
15/20 |
1/3 |
|
Third week |
240/470 |
12/32 |
1/4 |
|
20145123 Liu Senming The third week of the Java Programming Study summary