one of the main difference between interface and abstract class was that we could give implementation of some methods in abstract class And Interface were defined as hundred percent abstract class,but now interface can have method default defination
Asked
Active
Viewed 66 times
0
-
1You can implement multiple interfaces, you can only extend one class. Abstract classes can have fields, interfaces can't. But yes, the line is getting blurry. – Michael Apr 19 '18 at 07:22
-
@michael you should post that as an answer... – Tschallacka Apr 19 '18 at 07:25
-
@Michael thanks for the prompt response.People use to define Interface as 100 percent abstract class ,In java 8 Context is this defination valid\ – fawad Apr 19 '18 at 07:25
-
@fawad Not really. I'd say "interfaces are stateless, abstract classes may be stateful" (+ probably should be stateful) – Michael Apr 19 '18 at 07:29