Answer Posted / selvi
Java Language rule are such that we must implement all the
methods of an interface even if we put them into empty
braces.i.e. we must override all the methods declared in
the interface.
But we can create our classes as subclasses of one of
the adapter classes, then we need to override only some of
the methods we need. i.e, An adapter classes provide empty
implementation of all methods declared in an EventListener
interface.
| Is This Answer Correct ? | 191 Yes | 27 No |
Post New Answer View All Answers
Can we clone singleton object in java?
What is the size of int in 64-bit jvm?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
Which collections are thread safe in java?
What are the differences between include directive and include action?
When is the garbage collection used in Java?
Write a program to print 15 random numbers using foreach of java 8?
What is the use of string and stringbuffer?
Is java jre still free?
Is java 11 paid version?
Can we override data members in java?
Can we increase size of array?
what is singleton in java?
Is object a data type?
What is data type in computer?