Is it possible to create an object for an interface? If yes, how is it done? According to my view the following code says that we can:
You can create an anonymous inner class:
Runnable r = new Runnable() { @Override public void run() { } };
Therefore you create a new class which implements the given interface.
class
interface