I want to know that is there any use of empty abstract class in Java? If so, what is it?
An empty abstract class is very much equivalent to an interface except that it can extend a class
abstract class
interface
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?
2.1m questions
2.1m answers
60 comments
57.0k users