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
What does null mean in java?
What is boolean flag in java?
What is a map? What are the implementations of map?
Explain an algorithm to find depth of a binary tree.
What is Major and importance difference between for and foreach loop ?
What is the purpose of java?
What is object class in java?
What is command line argument
Why string is not thread safe?
Can we pass null as argument in java?
What is boolean data type in java?
What is difference between char array and string?
Is int primitive data type?
Are strings immutable in java?
What is java basic concept?