Summary of learning contents of textbook
This week I learned the basic syntax of Java. Divided into types, variables and operators, flow control.
One, type:
1. Java can be differentiated into basic types and class types. The class type is also referred to as the reference type.
2. The basic types in Java are integers, bytes, floating-point numbers, characters, and Booleans.
3, "//" is a single-line annotation, "/" and "/" are multiline annotations.
Second, variable:
1, Hump-type nomenclature: usually start with a lowercase letter, and at the beginning of each word the first uppercase. such as: ageofstudent
2. Initialize when using local variables.
3, Final qualification: as final double pi=3.14.
4, Binary 0b start, octal 0 start, hex 0x start.
5. Conditional operator: Conditional? Set up return value: Failed return value
6. Logical operators: With && or | | Non -!
7. Bitwise operations: with & or | Non-XOR or ^
8. Shift left <<, right >>
Third, Process Control:
1. If Else
The result of the conditional operation is true to execute the description statement in the IF {and}, otherwise execute the description statement in the {and} of else. If the condition is not true and does not want to do anything, else can be omitted.
2. Switch
A variable or expression in the parentheses of the switch to get the value, the value must be an integer, a character, a string, and so on, then compare with the case, manipulate the corresponding description in the case, then break; Jump statement, if there is no corresponding case statement, execute the default statement, If there are no actions to handle by default, you can omit default.
3. For loop, while loop
While is primarily used to stop the recurrence of conditions that must be judged during the execution period. The pre-test loop, because the condition will be judged before the loop executes.
4, break, continue (break will end block execution, continue will only skip the description, return to the loop area to start the next cycle)
Problems in teaching materials learning and the solving process
There are many similarities between this and the C language that I studied earlier. So it's not very difficult to understand. Some of the trouble is that the use of the program is very unskilled, I tried to use the teacher taught us the software. I'm still not used to it.
Problems in code debugging and the resolution process
According to the program written in the book, the following results are obtained
。。。。 My program did not add/n, so the results of the layout is very unattractive.
Other (sentiment, thinking, etc., optional)
This week has been the second week of learning Java. My feeling is that watching video learning Java is much better than reading a book by myself. Java and C language learning, all require a lot of practice. For beginners of me, watching video learning is like someone's hands-on teaching, very vivid. This is the better way I think.
Learning progress Bar
Lines of code (new | /Cumulative)
Blog volume ( | new/cumulative)
Learning time (new/cumulative) |
Important growth |
Goal |
3500 rows |
15 Articles |
400 hours |
|
First week |
100/100 |
2/2 |
20/20 |
|
Second week |
150/250 |
1/3 |
18/38
|
20145237 Java Programming 2nd week of study summary