Java primitive Type is the basic data type of java.
There are 8 basic data types for Java: Byte (bytes), short (shorter integer), int (integer type), long (long), float (single-precision floating-point type), double (double-precision floating-point number Type), char (character type), Boolean (Boolean type )。
All except the 8 are objects, including arrays.
For example: Char is a basic data type (that is, the original data type) and string belongs to the object
Packaging class to from http://blog.csdn.net/hjf19790118/article/details/7081925
The Java language is an object-oriented language, but the basic data types in Java are not object-oriented, which in the actual use of a lot of inconvenience, in order to solve this shortcoming, in the design of the class for each basic data type to design a corresponding class to represent, The classes that correspond to the eight basic data types are collectively referred to as wrapper classes (Wrapper Class), and some are translated as outer or data type classes.
The wrapper classes are located in the Java.lang package, and the corresponding relationship between the wrapper class and the base data type is shown in the following table:
Wrapper class Correspondence Table
Basic data types |
Packing class |
Byte |
Byte |
Boolean |
Boolean |
Short |
Short |
Char |
Character |
Int |
Integer |
Long |
Long |
Float |
Float |
Double |
Double |
In these eight class names, except for the integer and character classes, the class name and the base data type of the other six classes have been all the time, only the first letter of the class name is capitalized.
For the wrapper class, the use of these classes consists of two main types:
A, as the basic data type corresponding to the class type exists, convenient to involve the operation of the object.
b, contains the relevant attributes for each basic data type, such as maximum, minimum, and related methods of operation.
Since the use of eight packaging classes is similar, the following is an example of the most commonly used integer class to describe the actual use of the wrapper class.
More Usage Reference manual http://www.runoob.com/java/number-parseint.html
Java wrapper class