Originally posted by senthil sen:
I said that serialization interface is an null interface
1. It is not a "null" interface. i mean even if it is not having any methods, the interface will inherit all the method opertation(operation is the method without implementations) of java.lang.Object's class. So, i
java there is NO interface which doesn't have any operations.
2. but generally, We define interfaces, without operations to act as a "Marker". Look for Marker design
pattern in the UML,Patterns forum. Also check for "contract based design by Alister cokcBurn". The "Marker" interface defines the contract (a mere presence of the type) which needs to get adhered by the implementing classes.
a "Marker" interface is a pure type and there is no "service" a.k.a operations attached with the type.
I said that since it is null,so there is no resource used when we implement this interface.
Any class (implements an interface or not ) is used to create objects and objects will hold resources(memory).