Can we implement static method in interface
Posted on December 16th , 2011 by Admin
|
|
No we cannot implement static methods in interface because Methods specified on an interface should be there to specify the contract for interacting with an object. And static methods do not allow us to interact with an object if you find yourself in the position where your implementation could be made static, we may need to ask ourself if that method really belongs in the interface. Interfaces task is to specify behavior of an object. Static methods do n |
| ot specify a behavior of an object, but behavior that affects an object in some way. |
|
|