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 method in research paper?
Where are register variables stored?
How do you access command-line arguments within the code?
Which method cannot be overridden in java?
Are arrays primitive data types?
What is replaceall in java?
What is the purpose of a parameter?
What is the Scope of Static Variable?
Which is the class in java?
Can we store variables in local blocks?
How can we make a class singleton?
Is it possible to override the main method?
What is mean by encoding?
How is final different from finally and finalize?
What is difference between length and length() method in java ?