Chapter 13 Flashcards
Does interface have all methods definition
Yes
What are adapter classes
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.
Is there any work around for java single inheritance
Inner classes
Can inner class access instance variables and members of outer class
Yes
What are anonymous inner classes
It has no name. They have same capabilities as inner classes. They are difficult to understand.
Give an example of anonymous object
System.out.println(“Allah Akbar”);
What are 2 approaches of event handling
1- By implementing interface
2- By extending from adapter classes