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.
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).
Java is divided into Standard Edition, mini-version (embedded), Enterprise Edition (backend)
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.
XML is a way of describing data structures, and Java is a programming language.
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.
The main method must be a public type and must be static.
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.
A statement can be written on more than one line without any additional action required.
Comments/* */Not nested, there is an annotation method/** */
There is no unsigned type in Java
Non-reciprocal conversion of Integer and Boolean values in Java White Paper p36 details
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
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
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
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
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
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.
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