0

In advance, why don't interfaces have the ability to create class-side methods? This question was found in my lecture notes.

  • It could also refer to the fact that the methods of interfaces are implicitly abstract and can contain no body (whilst the methods on the class side must be given bodies). – Andrew Martin May 26 '13 at 10:33
  • 3
    [It looks like the term comes from smalltalk](http://stackoverflow.com/questions/3102245/what-is-the-smalltalk-equivalent-of-javas-static). – Piotr Praszmo May 26 '13 at 10:37

1 Answers1

3

I guess you are refering to Class methods (static methods). There is no fixed technical reasons for not supporting the static methods in interface. May be static methods aren't allowed simply because there's no compelling reason to do so;

For more information you can check these so answers link1,link2

Community
  • 1
  • 1
stinepike
  • 54,068
  • 14
  • 92
  • 112
  • 1
    Yes it is..Just found out from the @Banthar's answer that it was a term in smalltalk, referring to static methods.. –  May 26 '13 at 10:40