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
What is a instance variable in java?
How to create packages in java?
What is serialversionuid?
What are nested classes in java?
What is the difference between C++ and Java and your preferences?
How to declare an arraylist in java?
Is java good for beginners?
What is the flag in java?
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
What is size_t?
Explain a situation where finally block will not be executed?
Which is a valid identifier?
What are advantages of exception handling in java?
What is an error in java?
What is the advantage of OOP in java?