The Java(TM) type system supports a variety of primitive (built-in) data types such as int for representing integer data, float for representing floating-point values, and others, as well as class-defined data types that exist in supporting libraries (Java packages). (All Java primitive data types have lowercase letters.)
The String class is defined in java.lang, the core package of supplemental class definitions that are fundamental to Java programming. A more complete reference to this class includes the package specification java.lang.String. (By convention, class names have mixed-case letters: the first letter of each word is uppercase.)
The Java language has the following primitive types:
Primitive Type | Description |
boolean | true/false |
byte | 8 bits |
char | 16 bits (UNICODE) |
short | 16 bits |
int | 32 bits |
long | 64 bits |
float | 32 bits IEEE 754-1985 |
double | 64 bits IEEE 754-1985 |
For an overview of common nonprimitive data types, that is, class definitions provided by the Java environment, see the java.lang package within the standard Java distribution documentation, or the documentation supplied with your Java IDE.
copyright 1996-2000 Magelang Institute dba jGuru