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
What is replaceall in java?
What is an array in java?
Which class is the superclass for every class in java programming?
What is the difference between JDK and JVM?
Write a program to print fibonacci series
What is the exception hierarchy in java?
How can you set an applet’s height and width as a percentage?
Write java program to reverse string without using api?
What are alternatives to java serialization?
Can there be an abstract method without an abstract class?
Explain aggregation in java?
What are actual parameters?
How can you handle java exceptions?
Can we declare a class as static?
How we can execute any code even before main method?