Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / 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

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

Answer / krish

No, you cannot implement a method in side a method.it gives
you a compile error.

Is This Answer Correct ?    5 Yes 18 No

Post New Answer

More Advanced Java Interview Questions

whats is mean by filter?

1 Answers   SolutionNET,


How to deploy Jar, War files in J2EE?

0 Answers   HCL,


what is a Daemon Thread?

2 Answers  


What is glasgow?

0 Answers  


Is the session factory thread safe?

0 Answers  


Is there a guarantee of uniqueness for entity beans?

0 Answers  


Should synchronization primitives be used on bean methods?

0 Answers  


What is a thread?

3 Answers  


what is the Scope of Final Keyword in Java?

1 Answers   HCL,


how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.

0 Answers  


For which statements does it make sense to use a label?

0 Answers  


diff mvc1 and mvc2 wahts is mean by servlet chaining?

3 Answers   SolutionNET,


Categories