interfaces are the only type of classes which any class can extend. But unfortunately java developers(?) removed the ability to override an interface static method. Anyone know how can I call an interface method without creating a new instance of the class extending it?
Java interface static method helps us in providing security by not allowing implementation classes to override them. We can't define interface static method for Object class methods, we will get compiler error as “This static method cannot hide the instance method from Object”.
In order to call an interface method from a Java program, the program must first instantiate the interface implementation program. A method can then be called using the implementation object.