RE: What is the difference between Abstract class and Interface
A class implementing an interface must implement all of the methods defined in the interface, while a class extending an abstract class need not implement any of the methods defined in the abstract class. Additionally, a class extending an abstract class can implement an infinite number of it's own methods.
RE: What is the difference between Abstract class and ...
another key difference between abstract class and interface is that , in abstract class we can put sharable code, but that is not possible in case of interface.
Another key difference between abstract class and interface is that,
We can use interface as marker, ( we can use abstract class also as abstract but then we can't extends any oter class, so it is better always use interface as marker)
RE: What is the difference between Abstract class and ...
marker is nothing but like an indication, which means it says some intimation to the JAM or Container. For example, we want to store an object in the file then we have to intimate to the compiler that this object should be stored. This intimation can be done by implementing the interface java.io.Serializable.
RE: What is the difference between Abstract class and ...
All I know is that interface is a contract and abstract class is for generalization but I could not understand when to use abstract class and when to use interface?