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 does singleton mean in java?
What is command line argument
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
What do you mean by an object in java?
Explain the concept of proper inheritance?
Difference between comparator and comparable in java?
Which method must be implemented by all threads?
Describe 2 different ways to concatenate two strings.
What happens if we override private method?
What is an example of a constant variable?
Is assembly language a low level language?
Is arraylist dynamic in java?
What is a nested list?
What is main method?
Is array size fixed in java?