Static Methods In Interface

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AtulTiwari
    New Member
    • May 2007
    • 23

    #1

    Static Methods In Interface

    hello Guys I have a nice topic to discuss about,

    Can we Declare a static methods in Interfaces?
    when i have declared it, it gives a compile time error...

    Can any one having any idea about this problem that why we are not facilitate with static methods in Interfaces?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by AtulTiwari
    hello Guys I have a nice topic to discuss about,

    Can we Declare a static methods in Interfaces?
    when i have declared it, it gives a compile time error...

    Can any one having any idea about this problem that why we are not facilitate with static methods in Interfaces?
    All methods in an interface are implicitly public, abstract, and never static.
    You can declare a static interface inside an interface.
    All variables in an interface are implicitly static, public and final.

    You won't catch me with basics again today.

    Comment

    Working...