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 we can run a jar file through command prompt in java?
Why is static used?
Explain the use of sublass in a java program?
What do you mean by composition in java?
What is the need of transient variables in Java ?
Is c better than java?
What is the properties class?
What is parsing a string?
List out five keywords related to exception handling ?
What are different access specifiers in java? Explain
What is java util concurrentmodificationexception?
What is the importance of hashcode() and equals() methods?
can any body body expalin best definitions & best real time exaples for opps concepts.
Which methods are used during serialization and deserialization process?
What are basic keywords?