mohamed sanaullah wrote:They tell the compiler to treat the classes implementing them differently.
No. They do not tell the compiler anything. They are not magical in any way. For every use of a marker interface -- Serializable, Cloneable, or any other -- there is plain old
Java code somewhere doing something like
That is
all. Compilers know
nothing about them. The JVM itself knows
nothing about them.
Found an useful link: Are Marker Interfaces Dead?
Although some of what this article says is true, it contains the mistakes made in the post above, so far from considering it useful, I'd consider it harmful.