did interface can implementation method ? i know its not
possible but my interviewer said its possible ..but how..?
any one have idea ???

Answer Posted / suhail

Interface can i have implementation for method by using
class inside the interface this is the only way to have the
implementation...

public interface A{
public class B{
public void m1(){
}
}
}

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a instance variable in java?

789


How to create packages in java?

722


What is serialversionuid?

776


What are nested classes in java?

817


What is the difference between C++ and Java and your preferences?

852


How to declare an arraylist in java?

705


Is java good for beginners?

757


What is the flag in java?

800


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

755


What is size_t?

728


Explain a situation where finally block will not be executed?

774


Which is a valid identifier?

777


What are advantages of exception handling in java?

800


What is an error in java?

866


What is the advantage of OOP in java?

884