can you create interface instance ?
Answer Posted / sanddep
what uday did here was not creating the instance of the interface but he implemeted the interface through the anonymous class.Now the instance created is of that anonymous class which has implemented the interface and its reference is stored in the variable t.
Regards
Sandeep
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do I get the | symbol on my keyboard?
what is thread? What are the high-level thread states? : Java thread
Difference between concurrent hashmap and hashtable and collections
What is a dot notation?
What happens to a static var that is defined within a method of a class?
What is the static block?
What is arguments in java?
Why singleton is not thread safe?
How to compare two strings in java program?
Which collection allows duplicate values in java?
In a container there are 5 components. I want to display the all the components names, how will you do that one?
What is files manifesting?
What are annotations in java?
What are the approaches that you will follow for making a program very efficient?
What is method reference?