Java First day learning content Review--java White Paper Chapter III

Source: Internet
Author: User

  1. Java virtual machines can use both instant compilation and bytecode (to achieve platform-independent features), and the use of frequent bytecode sequences will be compiled into machine code for immediate compilation.

  2. The number of bytes in Java is fixed (for portability), unlike C + + (they only determine relative size relationships), and in Java Byte (1) short (2) int (4) long (8) Float (4) double (8).

  3. Java is divided into Standard Edition, mini-version (embedded), Enterprise Edition (backend)

  4. HTML is a way of describing the structure of a Web page, Java is a programming language, and its content provides an applet that can be embedded in a Web page.

  5. XML is a way of describing data structures, and Java is a programming language.

  6. All methods in Java need to be included in the class, so the main method requires a shell class to wrap it, and the shell class name must be the same as the. java file name, and second, the Shell class needs a fixed type format.

  7. The main method must be a public type and must be static.

  8. The default decimal is a double type, can be added after the number f is float type, 1_000_000 and 1000000 equivalence, _ Just for easy reading, no impact.

  9. A statement can be written on more than one line without any additional action required.

  10. Comments/* */Not nested, there is an annotation method/** */

  11. There is no unsigned type in Java

  12. Non-reciprocal conversion of Integer and Boolean values in Java White Paper p36 details

  13. Although there is a const reserved word in Java, but it does not function in C + +, the final reserved word completely replaces the const reserved word function

  14. The >> operation in C/s + + does not directly distinguish between logical right SHIFT and arithmetic right shift, in Java the rule of >> is arithmetic right shift,>>> is logical right shift

    The number to the right of the shift operator is automatically touched 32, so the right number is 35 and the 3 effect is the same

  15. Two strings can be concatenated directly into a combined string by the + operator, and when the + is concatenated with an integer value, the integer value is automatically converted to the corresponding string representation with the preceding connection

  16. There are many useful methods in string type, such as extracting some content from a string, and then the practical + Join method can indirectly implement the modification of the string, which is different from the direct modification of the C + + utility pointer, although inconvenient but safe

  17. Even string constants can be exploited if the strings are checked for equality. Call the method of checking for equality, here need finally = = determine whether the two strings are stored in the same location rather than judging whether the content is the same, only the string constants are shared, that is the same storage location, detailed in the white paper near the p47 page

  18. For empty strings and null strings, it is important to note that because a null string must not invoke a method, it is necessary to detect a null string when checking whether it is an empty string or a null string, before the method is guaranteed not to be a null string to invoke the null string.

  19. For the construction of the string, that is, the process of using the small string concatenation to get the large segment string, it is not recommended to use the splicing technique of + and so on, which can be used to construct the technique using the StringBuilder control and its method. Detailed in the White Paper P53 page.

This article is from the "Developing_rookie" blog, make sure to keep this source http://8942041.blog.51cto.com/8932041/1626758

Java First day learning content Review--java White Paper Chapter III

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.