can we write implementation for a method with in another
method?

Answer Posted / sharan raj

Yes, a method can be implemented within another method
using anonymous class.
using anonymous class: new ClassName({...});
For more details regarding anonymous class refer any java
document.

Is This Answer Correct ?    29 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe, in general, how java's garbage collector works?

540


What are the different class loaders used by jvm?

604


Define aop(assepct oriented programing)?

644


Is a class a subclass of itself?

592


What is threadfactory?

619






Do I need to import javlang package any time? Why ?

629


What you mean by COM and DCOM?

619


Explain the difference between object state and behavior?

570


How substring() method of string class create memory leaks?

552


What is ripple effect?

637


What is the difference between session and entity beans?

581


What are the call back methods in entity bean?

566


which type of objects reference will be given to client?

2034


What is the immediate superclass of the applet class?

605


What is a modular application? What does module-relative mean?

546