String · Why is not the basic data types

java  the String  is the object, is a reference type , the difference between the basis of the type and reference type is the base type only that simple character or number, a reference type may be any complex data structures , the basic type indicates only simple data types, reference types It may represent a complex data type, data type may also operate such behavior .   

java virtual machine processing base type and the type of reference is not the same, for basic types, java virtual machine to its allocated memory space actually occupied by data type, and for a reference type variable, he is just a pointer to a heap area examples of the pointer.

Guess you like

Origin www.cnblogs.com/yunhemeihe/p/12115240.html