I want to know that is there any use of empty abstract class in Java? If so, what is it?
See Question&Answers more detail:osI want to know that is there any use of empty abstract class in Java? If so, what is it?
See Question&Answers more detail:osAn empty abstract class
is very much equivalent to an interface
except that it can extend a class
abstract class myAbstractClass // extends anotherClass implements anInterface
{
}
interface myInterface // extends anotherInterface
{
}
This pattern is called Marker interface and SO has a lot of good data about it already: What is the purpose of a marker interface?