• 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