Is there a difference in the static structure in interface and class?
2/9/2019 8:30:58 PM
⏹️ You can't define static methods in an interface bcoz, static methods were belonging to "class " not to an " instance of class, and interfaces are not Classes.
Tejas Gupta thanx
I know the difference between class and interface but my question is that is there a difference between the static method in interface and class in the meta-space?
Shruthi thanx but we can define a static method in the interface since Java 8 (eke default method)
Writing an interface is similar to writing a class. But a class describes the attributes and behaviors of an object. And an interface contains behaviors that a class implements
GET THE FREE APP
Learn Playing. Play Learning
Send us a message