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.
