20165237 2017-2018-2 "Java Program Design" 3rd week Study summary Textbook study summary
1. For machine languages: classes such as assembly language.
2. Process-oriented languages: classes such as C (but equivalent to the lack of a subject in speech).
3. Object-Oriented languages: classes such as C + + or java.
4. class = class declaration + class body
Contents of the class body: Declaration of variables + method definition
The member variable is valid throughout the class, and its validity is independent of the position it is written in the class body.
A local variable in a method is only valid within a method and is related to the position it declares.
5.Java program consists of several classes, we can write these classes in different source files, and then put these source files in the same directory, and then just compile the main class source files, other related source files will be compiled together. Then basically run the main class of bytecode files can get the desired results.
6. Method overloading: A class can have multiple methods with the same name, but the parameters of these methods must be the same.
Avoid overloading ambiguity: the overloaded methods must be guaranteed to be different from each other's parameters.
7.import statements: Introduce classes in class libraries: Import statements, which can have multiple import statements, must be written between the package statement and the definition of the class in the source file.
8. Access: Member variables and methods that are decorated with the keyword private are private variables and private methods.
member variables and methods that are decorated with the keyword public become common variables and common methods.
member variables and methods modified with the keyword protected become protected variables and protected methods.
9. Classes cannot be decorated with protected and private.
10. The access restriction modifier is private < friendly <protected<public by the low-to-high order of access.
Code Hosting
(run result of statistics.sh script)
This week's Code project
Other
The fourth chapter of the study content a bit more, if you want to master all, or to slowly digest to do, learn a little more every day.
Learning progress Bar
|
Code lines (new/cumulative) |
Blog volume (Add/accumulate |
Learning Time (new/cumulative) |
important growth |
target |
5000 Line |
30 |
400 hours |
|
first week |
80/80 |
1/1 |
18/18 |
Learn to write simple Java applications |
second week |
357/437 |
2/3 |
15/33 |
Mastering the use of arrays, symbols, data |
third week |
695/1132 |
2/5 |
20/53 |
|
20165237 2017-2018-2 Java Programming 3rd week of study summary