aspose file tools*
The moose likes Java in General and the fly likes we know that serialization is null,so is there any advantage using it other than ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "we know that serialization is null,so is there any advantage using it other than ..." Watch "we know that serialization is null,so is there any advantage using it other than ..." New topic
Author

we know that serialization is null,so is there any advantage using it other than ...

senthil sen
Ranch Hand

Joined: Oct 10, 2002
Posts: 184
we know that serialization is null,so is there any advantage using it other than Externalization??
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
we know that serialization is null
We do? I can't imagine what this might mean.


"I'm not back." - Bill Harding, Twister
senthil sen
Ranch Hand

Joined: Oct 10, 2002
Posts: 184
hi jim,
Actually i was asked this question in an interview.
I said that serialization interface is an null interface, the next question he asked me was .
Q./U say that serialization is null and it serialises an object,is there any advantage in using this???
I said that since it is null,so there is no resource used when we implement this interface.
Is there any u can say about this discussion??
aadhi agathi
Ranch Hand

Joined: Apr 29, 2002
Posts: 263
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).


Aadhi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: we know that serialization is null,so is there any advantage using it other than ...