Answer Posted / subhash
No.We cannot create instance for interface.But we can
create reference to an interface.We can implement the
interface by creating sub class(implementation class) and
creat instance to the sub class, then you can create
reference to the interface by assigning instance of sub
class to the interface reference variable.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Why hashmap is used in java?
Which arithmetic operations can result in the throwing of an arithmeticexception?
Is java owned by oracle?
What is a conditional statement explain with example?
What do you mean by default constructor in java?
Can we sort arraylist in java?
How does compareto method work?
What is the basic difference between string and stringbuffer object?
What does nullpointerexception mean?
How to check if a list is sorted in java?
what is a thread pool in java and why is it used?
Is math an abstract class in java?
What is the major drawback of internal iteration over external iteration?
What access modifiers can be used for variables?
What are the different types of garbage collectors in java?