This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Its a interface, giving instruction to the compiler to provide default behaviour of a function.
Not quite right. A marker interface does nothing at all and the compiler does nothing but "mark" the class as implementing the interface. Its only value is that later you can check "object instanceof Interface" and find out whether or not it is present.
All that tricky reflection stuff to serialize an object is provided by the object streams. They check to see if the marker is present and throw an exception if not.
Does that make sense?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi