While creating threads I see code like:-
Runnable watdaheck = new Runnable()
{
System.out.println("java with time contradicts itself");
}
From what I know an interface cannot be instantiated so I fail to understand how we can write Runnable() for creating anonymous class. An interface can be given a reference but cannot be instantiated is what we are taught in polymorphism.