Week 2 - classes & objects Flashcards

1
Q

Local variables are stored on the…

A

Stack.

Local variables referencing objects are stored on the stack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Objects are stored in an area of memory called…

A

The heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An object is a(n) __________ of a class

A

An object is an instance of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Modularity is…

A

… separating entities into separate logical units

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Data hiding is also known as…

A

encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Encapsulation is…

A

AKA data hiding. Encapsulation allows an objects private data and methods to be changed without effecting other objects that depend on it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Two methods with the same name but different number of params are…

A

Overloaded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Public, static, private are…

A

Modifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In declaring a method; int, double, void are…

A

Return types

ie the type that is going to be returned to the main method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It is not possible to instant irate objects on the heap

A

False.

Objects are stored in memory known as heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly