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

What is a policy?

1882


What is ioc concept & explain it?

702


What are the steps to write p-to-p model application?

2050


What event results from the clicking of a button?

786


How primary key is implemented in Oracle?

2025






What is the difference between RMI registry and OS Agent?

734


What are the pros and cons of detached objects?

631


what is a portable component?

1564


What are the different algorithms used for clustering?

655


What modifiers may be used with an interface declaration?

666


Difference between new operator and class.forname().newinstance()?

710


Explain the different types of memory used by jvm?

723


What is in-memory replication?

652


How will you pass parameters in RMI? Why do you serialize?

798


How a component can be placed on Windows?

2354