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


Please Help Members By Posting Answers For Below Questions

what is the difference between future and callable interface in java?

589


What is a war file?

530


What do you mean by composition in java?

550


Why can't we override private static methods?

505


What is null statement?

518






What are strings in physics?

528


Why destructor is not used in java?

504


What is meant by local variable and instance variable?

585


What is a nonetype?

555


What is square root in java?

577


What is string syntax?

538


What Is Query Throttling in java?

549


How to find the index of the largest number in an arraylist java?

503


What is meant by nested loop?

530


What are jee technologies?

523