Summary of the 2nd week of Java programming

Source: Internet
Author: User

20145317 Peng Yao "Java program Design" The 2nd week study Summary textbook Learning content Summary

Type primitive type integer (short, int, long) byte (byte) floating-point number (float/double) character (char): Chinese characters, English characters are double-byte, java character encoding is UNICODE6.2.0,JVM encoding is UTF-16 Big Endian Boolean: True/false in a Boolean type cannot be operated with other types

Class type Note three notes//: Single-line//: MultiRow/ */:javadoc Document comments Why do you want to comment on the salient features of a concise outline program or provide an overview to help others understand the program, improve the readability of the program annotation Why (why), Do not comment on what to do (what), pseudo-code is the best comment (refer to "Experiment two Java object-oriented programming") Note notes to the function and global Data add comments to clarify the situation, do not mess with the obvious things do not comment poor code, rewrite it do not contradict the code (JAVADOC) The best and worst code of the law of negation does not require comment variables note the Camel case nomenclature constants for variable names in Java are named with the final decoration in accordance with Min-length && max-information, not in Hanyu Pinyin, Refer to naming conventions and Google Java Style. Before local variables are used to initialize literal constants (Literal constant) integers can be binary (0bdddd), octal (0DDD), Decimal (dddd), hexadecimal (0XDDDD), in Java are signed under integers, no unsigned Floating-point numbers such as int scientific notation decimals (such as 1.4) The default type is double,1.4f or 1.4F, and the float character can be represented by a Unicode character encoding (code point).

, >=, <, <=, = =,! = Conditional Operator: conditional expression? Return value when established: the return value on failure logical operation: The result of the operation is a Boolean value: TRUE or False with (&&) or (| | ) Non (! ) Bitwise operation: The result of the operation is a bit string (bit vector), commonly used for mask operation and (&): Full 1 is 1, there are 0 0 or (|): All 0 is 0, 1 is 1 • Non (~): The book says is the complement, according to our custom should be anti-code XOR or (^): The same is 0, the difference is 1 left shift (< <): Right 0 arithmetic right shift (>>): Right shift, positive number of the highest bit 0, negative number of the highest bit 1 logical right SHIFT (>>>): After the right shift, the highest bit is always 0 increment, decrement i++,i--++i,--I

Assign value

+ =,-=, *=,/=,%=,&=, |=, ^=, <<=, >>= type conversion short and long (widening) is safe, long-and short (narrowing) must cast expressions with different types to length Whichever is the longest, the other will be type-lifted (Promote)

Problems in teaching materials learning and the solving process

After the second week of study, I feel that Java and the big-day C language of the basic grammar is basically the same, no difficulty in learning.

Problems in code debugging and the process of solving learning progress bar

| | Lines of code (new/cumulative) | Blog volume (Add/accumulate) | Learning time (NEW/cumulative) | Important growth |

| Target | 5000 Rows | 30 Articles | 400 hours | |

| First week | 200/200 | 2/2 | 20/20 | |

| Second week | 300/500 | 1/3 | 18/38 | |

Resources
    • Java Learning Notes (8th Edition)
    • Java Learning Note (8th Edition) Learning Guide
    • ...

Summary of the 2nd week of Java programming

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.