Week 2 - classes & objects Flashcards
Local variables are stored on the…
Stack.
Local variables referencing objects are stored on the stack.
Objects are stored in an area of memory called…
The heap
An object is a(n) __________ of a class
An object is an instance of a class
Modularity is…
… separating entities into separate logical units
Data hiding is also known as…
encapsulation
Encapsulation is…
AKA data hiding. Encapsulation allows an objects private data and methods to be changed without effecting other objects that depend on it
Two methods with the same name but different number of params are…
Overloaded
Public, static, private are…
Modifiers
In declaring a method; int, double, void are…
Return types
ie the type that is going to be returned to the main method
It is not possible to instant irate objects on the heap
False.
Objects are stored in memory known as heap