Java Quiz 23 - Is it possible to create an instance of an interface? #java #quiz

preview_player
Показать описание
Java Quiz 23: Is it possible to create an instance of an interface in Java?
In Java, you cannot create an instance of an interface directly because interfaces are abstract by nature. However, you can create an instance of a class that implements the interface or use an anonymous class or lambda expression to provide the implementation for the interface. Want to dive deeper into the concept of interfaces? Test your understanding with this quiz!

#java #quiz #javaquiz #javamcq #codingtips
Рекомендации по теме
Комментарии
Автор

Interface can not be directly instantiated but Annonymous inner class can be created for interface.

Life-is--beautiful