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
How we can skip finally block of exception even if some exception occurs in the exception block in java?
What is a method declaration?
Give example to differentiate between call by value and call by reference.
Is java a security risk?
What are the Class Libraries ?
What is a JAR file?
What is java and why do we need it? Explain
What is difference between variable declaration and definition?
Where is singleton pattern used?
Explain the difference between abstraction and encapsulation.
What is difference between hashset and hashmap in java?
What are different access specifiers in java? Explain
How is it possible in java programming for two string objects with identical values not to be equal under the == operator?
What is java thread dump, how can we get java thread dump of a program?
How many bits is a char?