So abstract classes can be extended, but so can any class right? So why are some specific classes abstract and others not?
Furthermore, I have tried to figure out but I always get rather confused but what is the actual difference between an interface and an abstract class?
Thanks to anyone who can clear this up for me!
An interface can only describe method signatures, eg
And a class that implements it, must define the method.
An abstract class can only be inherited, but it can still define a method:
And any classes that implement it can use that method. Abstract classes can also implement
finalmethods, so they can never be re implemented by a class that extends it.