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

Answer Posted / sumitpalsingh

Yes,we can write one method implementation inside another method.

public class ImplementMethodEx {
public void m1(){
System.out.println("M1-Method Impl.");
}
public void m2()
{
m1();
}
public static void main(String[] args) {
ImplementMethodEx obj=new ImplementMethodEx();
obj.m2();

}

}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is orm?

852


What is the relationship between an event-listener interface and an event-adapter class?

768


What is difference between object state and behavior?

804


How are commas used in the intialization and iteration parts of a for statement?

812


what are the advantages of JTA over JTS?

1902


How to pass parameters in RMI?

1957


difference between  ejb,struts,hibernate,spring and jsp

2562


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

840


what is an isolation level?

2435


Can you control when passivation occurs?

804


Can I run seam with jdk 1.4 and earlier?

739


What are various types of class loaders used by jvm?

707


What is the difference between a static and a non-static inner class?

826


How task's priority is used in scheduling?

1993


How are the elements of a borderlayout organized?

833