can we write implementation for a method with in another
method?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is the difference between a menuitem and a checkboxmenuitem?
hi, All are saying that now software field position is not good and in 5-10yrs total software field ll be saturated . is it true? i am unable decide ii continue in this field or not please tell me?
Why use POJO when I can use hashmap
What is the highest-level event class of the event-delegation model?
how the action can be map from jsp page to bean class in mvc1
what are design patterns in java?give with example?
we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?
Why does most servlets extend HttpServlet?
which of the following authentication is stronger than the others? a. Http Basic b. Http DIGEST c. Form based
Have you used threads in Servelet?
What is glasgow?
whats is mean by tiles in struts