method declarations of an interface are public abstract by default because there is no implementation and they have to be implemented by any concrete class which implements the interface. And abstract methods can't be static because they don't have an implementation which could be called
You are allowed to assign a value to a field in an interface declaration so you can later use this field as a static constant.
But you can't give an implementation for a method in an interface declaration because methods in an interface are abstract by default: abstract = NO implementation!!! So it's obvious that such a method can't be static at the same time because you are allowed to call static methods but you are not allowed to call abstract methods!
Anyway the main reason for interfaces is to define abstract method prototypes which have to be implemented by any concrete class to fulfill the contract of the public API of the interface. So it doesn't make sense to define method implementations in an interface.
Joined: Feb 26, 2008
Thanks Marco Now its cleared.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com