• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we know that serialization is null,so is there any advantage using it other than Externalization??
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we know that serialization is null
We do? I can't imagine what this might mean.
 
senthil sen
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
reply
    Bookmark Topic Watch Topic
  • New Topic