Exam 1 Review Flashcards
1
Q
Pass by Value
A
local copy is made
2
Q
Pass by Reference
A
Any change made to a parameter is kept
3
Q
Mutable class
A
objects can be changed after construction
4
Q
Immutable class
A
Once an object is constructed, the prior instance variables CANNOT be changed
5
Q
example of immutable class
A
calendarDate()
6
Q
Which has parenthesis at the end? Object or Class
A
Class
7
Q
Primitive data type
A
Pass by value
ex. integral, boolean, floating point
8
Q
Reference data type
A
Pass by reference
ex. Array, interface, class
9
Q
Reference variables are stored in…
A
Heap area
10
Q
Overloading
A
Two methods of the same name but one has specific parameters
11
Q
When to use the .this operator
A
within an instance method or constructor