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

What is chat area? Explain.

650


Do you think that java should have had pointers?

696


What is a sessionfactory? Is it a thread-safe object?

808


Explain what is synchronization?

676


What restrictions are placed on the location of a package statement within a source code file?

718






How task's priority is used in scheduling?

1877


Define prototype?

669


What is ioc concept & explain it?

702


If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?

656


What modifiers may be used with an inner class that is a member of an outer class?

677


What state does a thread enter when it terminates its processing?

685


what are memory considerations of jsp compares to other web components?

6125


What is the argument type of a programs main() method?

653


Is the infobus client side only?

735


How can I avoid validating a form before data is entered?

631