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 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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With