can you create interface instance ?
Answer Posted / ramu
hey uday u r wrong
In your program you are not created obj for interface, you have given anonymous implementation for 'Test' interface and instantiated that anonymous class only but not the interface.
for conformation call getClass() on 't'.(t.getClass())
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is an empty arraylist null?
What is the implementation of destroy method in java. Is it native or java code?
What do you understand by the term polymorphism?
Explain thread in java?
Can final class have constructor?
Is string a datatype?
What are the types of methods in java?
Should a main method be compulsorily declared in all java classes?
Can we inherit a class with private constructor?
Distinguish between a predicate and a function?
Can It is possible to synchronize the constructor of a Java Class?
Why put method is idempotent?
Can singleton class be serialized?
What are the pillars of java?
What are the types of strings?