Answer Posted / anil pusuluri
One can't instantiate an interface. One can get a reference
to an interface.
Let's say Class A implements interface iA then we can't
instantiate IA
like IA a = new IA() -- this gives compilation error.
but we can get the referance to interface as below
IA a = new A()
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is the difference between future and callable interface in java?
What is jagged array in java?
Does importing a package imports its sub-packages as well in java?
What does it mean that a class or member is final?
What is main function purpose?
What are advantages of using Java?s layout managers than windowing systems?
How do you sort in descending order in java using collections sort?
How do you write a conditional statement?
explain different ways of using thread? : Java thread
What is passing value java?
When can you say a graph to be a tree?
How you can force the garbage collection?
What are the features of java?
What is java Applet?
What are loops in java?