Thursday, February 7, 2013

References and Primitive Data Types

References and Primitive Data Types:


•Java distinguishes two kinds of entities
•Primitive types
•Objects
•Primitive-type data is stored in primitive-type variables
•Reference variables store the address of an object
•No notion of “object (physically) in the stack”
•No notion of “object (physically) within an object”

Primitive Data Types:
•Represent numbers, characters, boolean values
•Integers: byte, short, int, and long
•Real numbers: float and double
•Characters: char

No comments:

Post a Comment