4.1
The Kinds of Types and Values
TYPES, VALUES, AND VARIABLES
of type  array of
T
 ; if
T
 is a reference type, then a variable of type  array of
T
can hold a null reference or a reference to any array of type  array of
S
  such that
type
S
 is assignable ( 5.2) to type
T
. A variable of type
Object
 can hold a null
reference or a reference to any object, whether class instance or array.
4.1   The Kinds of Types and Values
There are two kinds of
types
 in Java: primitive types ( 4.2) and reference types
( 4.3). There are, correspondingly, two kinds of data values that can be stored in
variables, passed as arguments, returned by methods, and operated on: primitive
values ( 4.2) and reference values ( 4.3).
Type:
PrimitiveType
ReferenceType
There is also a special
null type
, the type of the expression
null
, which has no
name. Because the null type has no name, it is impossible to declare a variable of
the null type or to cast to the null type. The null reference is the only possible
value of an expression of null type. The null reference can always be cast to any
reference type. In practice, the Java programmer can ignore the null type and just
pretend that
null
 is merely a special literal that can be of any reference type.
4.2   Primitive Types and Values
A
primitive type
 is predefined by the Java language and named by its reserved
keyword ( 3.9):
PrimitiveType:
NumericType
boolean
NumericType:
IntegralType
FloatingPointType
IntegralType: one of
byte short int long char
FloatingPointType: one of
float double
30






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved