adapter class ?
Answers were Sorted based on User's Feedback
Answer / janet
An adapter class provides an empty implementation of all
methods in an event listener interface.Adapter classes are
useful when you want to receive and process only some of
the events that are handled by a particular event listener
interface.you can define a new class to act lisener by
extending one of the adapter classes and implementing onlu
those events in which you are interested.
For ex: the MouseMotionListenerAdapter class has two
methods,mouseDragged() and mouseMoved(). The signatures of
these empty are exactly as defined in the
MouseMotionListener interface. If you are interested in
onlu mouse drag events,that you could simply extend
MouseMotionAdapter and implement mouseDragged().
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
adapter class provides empty implementation for
eventlistener interface
Is This Answer Correct ? | 0 Yes | 0 No |
Can we have 2 main methods in java class?
What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }
What is polymorphism in java? What are the kinds of polymorphism?
Explain different ways of passing arguments to sub-routine?
what are variables in java
I need help please send me reply: Write a program "if given a string like 'HAT', the combination's returned should be like ATH,THA,TAH in java"?
List two java ide’s?
Write a function for palindrome and factorial and explain?
0 Answers Honeywell, Huawei, Zomato,
What is an image buffer?
what is difference between validation.xml & validation rules.xml?
What is numeric promotion?
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?