I did not understand use of marker interfaces and following statement. I read like
'marker interfaces just tell the compiler that the objects of the classes
implementing the interfaces with no defined methods need to be treated differently.(ex cloneable, serializable)
A marker interface is a (mostly obsolete) way of providing meta-data about instances of a particular type.
For instance, having a class implement java.io.Serializable is a way to tell the JVM "Hey, my instances are eligable for object serialization, so if they get passed to an ObjectOutputStream, you can work your serialization magic and not throw a NotSerializableException, mkay?".
Nowadays, annotations would be the preferred way to specify meta-data.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.