Summary Flashcards OOP

1
Q

Encapsulation is

A

the process of combining data and methods in single unit

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

Abstraction

A

is to hide the complexity of the program , hides the unnecessary details from the user using classes

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

inheritance

A

allows creating hierarchy of related classes, allows code reusability

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

polymorphism

A

same concept can have different meanings in different contexts has to form overloading and overridding

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

classes reserves memory?

A

nope

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

composition is

A

make an object

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

inheritance

A

extend a class

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

you can not inherit

A

final methods/ fields
attribute methods/ fields
private methods/ fields
constructors

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

constructors and static can not be abstract?

A

true, as they can not be inherited and for static its for the whole class cannot be overridden

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

parameters in methods passes by value unless

A

unless it passes objects or strings

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

assigning subclass to a superclass can be?

A

nope , you can’t assign subclass to superclass

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

a class must have a …

A

constructor

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

for each syntax

A

for (int item:arr) { System.out.println(item); }

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

arrays holds … (values/references)

A

references

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