+ 4
What is the difference between abstract class and interface?
5 Respuestas
+ 3
An interface has predefined method names that have to be used but does not have anything in them while an abstract is a combination of a normal class and an interface... it will have some methods where code is provided as well as some that are required. You are extend an abstract while you implement an interface. Hope this helps?
+ 1
An abstract class can contain attributes like normal class do, but interface can only have final ones.
0
The essential difference is that a normal class can only inherit one class(abstract or normal class) while it can implement one or more interface.
0
Another difference is, an abstract class may contain abstract methods or normal methods or both. An interface on the contrary contains only abstract methods.
0
interface is not class but use to implement the function
abstract is a class but cannot be instantiate except by extending that by subclass.