Can we create an object of type Interface Explain your answe

Can we create an object of type Interface? Explain your answer.

Solution

The answer is w.r.t JAVA

You can\'t instantiate an interface directly, but you can instantiate a class that implements that interface:

This is basically the same as what you\'re doing inline. The brackets after new Runnable() will contain your implementation inline.

 Can we create an object of type Interface? Explain your answer.SolutionThe answer is w.r.t JAVA You can\'t instantiate an interface directly, but you can insta

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site