Summer learning Java 5

Suppose the first class is instantiated. Then the following order of the static loading is always better than non-static priority order from morning to night is: a static block of code sequence and subsequently static member variable determined by the previous code location.

2 code blocks and order of the member variables are also determined according to the position of the code

3 and finally call the constructor constructor

The basic data type in Java only 8: byte, short, int, long, float, double, char, boolean; in addition to the basic types (primitive type) and enumerated types (enumeration type), and the rest are reference types ( reference type)

, Java basic data types for each type of packaging are introduced (wrapper class) corresponding to, int is the packaging Integer, beginning from introduction of the JDK 1.5 automatic boxing / unboxing mechanism, so that the two can be interchangeable.
Java provides a package for each type of primitive types:
primitive types: boolean, char, byte, short , int, long, float, double
Package Type: Boolean, Character, Byte, Short , Integer, Long, Float, Double

Guess you like

Origin www.cnblogs.com/xiatian21/p/11431793.html