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
What is stack class in java?
How can we achieve thread safety in java?
What is the purpose of return statement?
What if constructor is protected in java?
Is a boolean variable?
Can java list contain duplicates?
Can we use static class instead of singleton?
what is the difference between preemptive scheduling and time slicing? : Java thread
Why convert an applet to an application?
5 Coding best practices you learned in java?
Write a factorial program using recursion in java?
Can a class have multiple superclasses?
Difference between default and protected access specifiers?
What is the difference between array and array list in java?
Difference between predicate, supplier and consumer ?