Externalizable vs Serializable

Last modified on August 1st, 2014 by Joe.

You may need Externalizable,

  1. If you are not happy with the way java writes/reads objects from stream.
  2. Special handling for supertypes on object construction during serialization.

Comments on "Externalizable vs Serializable"

  1. abhijit says:

    nice explanation …. thank u

  2. Anonymous says:

    Every thing what you write is very help full.

    Thank you so much.

  3. Sirisha Gundala says:

    Every thing what you write is very help full.

    Thank you so much.

  4. DC says:

    right to point explaination

  5. Anshul Jaiswal says:

    Thank you so much sir it is really helpful. :)

  6. Shamil says:

    You can also change default serialization behavior with Serializable interface by overriding writeObject and readObject methods.

  7. Dev Ghotkule says:

    Superb Post…I like the way ur present the things with graphical images.

  8. Irina says:

    thanks again…love your posts that educate quickly, efficiently and to the point:)

  9. utkal says:

    great post

  10. Suresh says:

    Kalakure Joe…

  11. Jagdish says:

    Hi Joe,
    I am Jagdish, i have some question in Java.
    Please give me ur email id so that i can contact

  12. Hari says:


    I am Hari, i found exactly what i was looking for in this post, it would be great if you can provide some example here as well. Keep up the good work you. Thanks for sharing your knowledge.

  13. Preethi says:

    thank yu so muchhhh….

    i have passed my interview with CTS…

    main reason is your site and it helped me a lot, thanks..

  14. jose says:

    thank you

  15. Ruchika says:

    its really helpful and knowledgeable.

  16. Israr says:

    Thanks so much Sir,

    Really it’s knowledge jargon it’s amazing Wow…

  17. Farid says:

    if we use serialization to save an object on memory then we modify that class(definatly object has changed now) now we deserialize that object what will be happen, kindly answer

  18. Amzad says:

    Hi Joe,
    What a blog you have created. It is really very much useful when we are facing interviews. I have learnt a lot from your blog.


  19. Ganesh says:

    Thank you, It is really helpful.

  20. Anonymous says:

    IT is good but not best.

  21. Manjula.A says:

    It has very useful information for the beginners… good job..joe

  22. Prabu.R says:

    this site is very interesting and it is presented in the good manner….

  23. Rangalal Gamage says:

    Short & Sweet…….. Tx

  24. Anonymous says:

    Your article are always short and genuine answers.


  25. hari says:

    good explanation …thanks for the article

  26. Anonymous says:

    thanks for providing helping material

  27. Anonymous says:

    Explanation states that during deserialization constructor runs, but it is not the case. Please update the article.

  28. Joe says:

    What I have written is, “..In object de-serialization (reconsturction) the public no-argument constructor is used to reconstruct the object. In case of Serializable, instead of using constructor, the object is re-consturcted using data read from ObjectInputStream…”

    Looks like you have misunderstood what I have written :-)

  29. Joe says:

    So happy to know that.

    All the best for your career Preethi.

  30. Anonymous says:

    It helps me a lot…
    Thank you.

  31. Anonymous says:

    Hi Joe,

    Y singleton object will be de-serialized to a new instance even though it is singleton.

    Can u pls explains this.

  32. Kumar says:

    Hello Joe,
    This is really a nice blog.
    When I was reading this blog, a q comes in my mind, why we have externalization when we can override our writeObject and readObject for Serialization and can have a customer implementation for write and read Object.

  33. nitin says:

    YOu have mentioned that in case of serialization, “the object is re-consturcted using data read from ObjectInputStream…” but
    ObjectInputStream is used in de-serialization process. It’s little confusing. Please clarify a bit more that..

  34. Rakesh P says:

    why we have Externalizable when we can override writeObject and readObject in java

  35. jessica says:

    Very useful article, thanks a lot!

Comments are closed for "Externalizable vs Serializable".