A static method is a method related to a class, not to an interface.
In interfaces you define a behaviour that has to be implemented by a class. How do you implement an interface? Overriding all the methods declared by that interface.
But static methods cannot even be overridden...
As Nicola said, what that interface has is a constant attribute named 'coolName' which refers to an object of an anonymous inner class that implements a Runnable interface.
Joined: Jun 15, 2010
Suppose static methods were allowed in an interface. A class implements that interface , and in that class we would give d definition(body) for
the static method , as for normal interface methods. and then we could call the implemented method..
Interface is a reference type like class that can contain only constants,method signature ,default methods,static method and nested types.Method body exist only for default and static methods
Reason for introducing this change is whenever a method is added in interface all class implementing it must be modified so now by adding two more type method .problem is solved