JAVA8 Abstract Vs Interface

Опубликовано: 21 Октябрь 2024
на канале: codeWithVenky
77
4

A class can have a state which can be modified​
by non-abstract methods but an interface cannot have the state because they can't have instance variables.​

define constructors inside an abstract class, but you cannot define constructors inside an interface in Java.​

By using abstract class you can achieve only single level inheritance while multiple inheritance is possible though Interface​