What is the use of an empty abstract class?

I want to know what is the use of an empty abstract class in Java? If so, what is it?

+5
source share
3 answers

Empty is abstract classvery similar to interface, except that it can expandclass

abstract class myAbstractClass // extends anotherClass implements anInterface
{

}

interface myInterface // extends anotherInterface
{

}

This template is called the marker interface , and SO has a lot of good data about it already: What is the purpose of the marker interface?

+6
source

you can inherit only one abstract class. Then it is useful to avoid inheritance.

0
source

, .

0

All Articles