X hits on this document

171 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 views171
Page views171
Page last viewedMon Jan 23 21:44:58 UTC 2017
Pages46
Paragraphs816
Words2901

Comments