Java basic types of base (II)

Often used in the type of programming in a series, they need to be treated specially, we call basic types. Because the new object is stored in the "" pile, so with the new to create an object, such as a very small, simple variable, often not very effective.

Thus, for these types, java not new to create a variable, but to create "automatic" variable is not referenced. This variable is stored directly, "value", and placed in the stack, and therefore more efficient.

 

 

The size of the storage space occupied by the boolean type not specified, is defined to be able to take only the literal true or false.

Basic categories wrapper class, makes it possible to create a non-base objects used to represent the corresponding basic types, for example:

char X = 'C' ; 
Character CH = new new Character (C); 
can also be so used: 
Character C = new new Character ( 'C');

 

Guess you like

Origin www.cnblogs.com/jamal/p/10956735.html