20145237 Java Programming 2nd week of study summary

Source: Internet
Author: User
Tags case statement logical operators

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

/Cumulative) new/cumulative)

Lines of code (new
Blog volume (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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.