can you create interface instance ?
Answer Posted / anthony
cool buddy. Nice way to fool people.
If you really need to check the concept, put the code in
eclipse or netbeans and see. The method in the anonymous
class would show as overriden from interface Test and if
you remove the method from the anonymous class, it would
not compile. So at the end you are having an instance of
class implementing the interface.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is string manipulation?
What are class types in java?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
What are the advantages and disadvantages of object cloning?
What is the difference between a break statement and a continue statement?
Explain the importance of import keyword in java?
What is reflexive association?
In case of inheritance what is the execution order of constructor and destructor?
Is there any case when finally will not be executed?
Can you add null to a list java?
What is java objectoutputstream?
What is methodological theory?
How do you execute a thread in java?
What are wrapper classes in java?
What do you know about the garbage collector in java?