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 meant by abstract class?
What is java jit compilers?
How many bytes is double?
How java is similar to c?
What are different types of control structures?
Is minecraft java edition free?
Java is Pass by Value or Pass by Reference?
What is the maximum size of arraylist in java?
Why string is immutable with example?
What is the purpose of lambda expressions?
Why do we need autoboxing in java?
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
Is node a data type in java?
Define inheritance?
Is a boolean 1 bit?