Text Processing and Wrapper Classes I
- Contents
- Introduction to Wrapper Classes
- Wrapper Classes
- Character Testing and Conversion With the
Character
Class - Searching Strings
- Extracting Substrings
- Extracting Characters to Arrays
- Returning Modified Strings
- The
valueOf
Methods - The
StringBuilder
Class - Appending to a
StringBuilder
Object
Introduction to Wrapper Classes
Java provides eight primitive data types.
Type Min Max byte
-128 127 short
-32768 32767 int
-2.14748 × 109 2.14748 × 109 long
-9.22337 × 1018 -9.22337 × 1018 float
-3.40282 × 1038 3.40282 × 1038 double
-1.79769 × 10308 1.79769 × 10308 boolean
false
true
char
0
65535
They are called “primitive” because they are not created from classes.
-
A wrapper class is a class that is “wrapped around” a primitive data type.