X hits on this document

125 views

0 shares

0 downloads

0 comments

18 / 46

© S. Uchitel, 2004

18

Primitive and Reference Types

In Java all variables and parameters are:

typed, and

stored in the program stack.

There are two kinds of types:

Primitive types:

E.g. char, boolean, int, double, ...

Values are stored within the stack.

Reference types:

E.g. Strings, Arrays, Car, Lecturer, ...

References are stored within the stack.

Each class introduces a new reference type

Document info
Document views125
Page views125
Page last viewedSat Dec 10 21:28:52 UTC 2016
Pages46
Paragraphs816
Words2901

Comments