Chapter 13 Flashcards

1
Q

Does interface have all methods definition

A

Yes

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

What are adapter classes

A

It is a solution of such interfaces where we need to put all methods implementation and definition. When we use adapter class, then we do not need to implement all unnecessary methods. We define them and just kept them empty.

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

Is there any work around for java single inheritance

A

Inner classes

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

Can inner class access instance variables and members of outer class

A

Yes

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

What are anonymous inner classes

A

It has no name. They have same capabilities as inner classes. They are difficult to understand.

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

Give an example of anonymous object

A

System.out.println(“Allah Akbar”);

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

What are 2 approaches of event handling

A

1- By implementing interface

2- By extending from adapter classes

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