This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to serialize?

 
Vidya Ramachandran
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to serialize a binary tree and a BST and then rebuild the tree?
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make a class (that provides the Binary Tree functionality) and implement the Serializable interface or Externalizable interface. Use their methods to flatten the Object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic