Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
Java Language EssentialsDownload tutorial zip fileEmail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPrevious panelNext panel
Course Notes
  


Data types page 9 of 37


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 TypeDescription
booleantrue/false
byte8 bits
char16 bits (UNICODE)
short16 bits
int32 bits
long64 bits
float32 bits IEEE 754-1985
double64 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


Main menuSection menuGive feedback on this tutorialPrevious panelNext panel
PrivacyLegalContact