title: write my tree object to a file in java?
body: <p>i want to write an object of my class to a file and use it later 
  how should i do?
  for example i want to write t4 to file:</p>
  
  <pre><code>   BinaryTree t1 = new BinaryTree( 1 );
          BinaryTree t3 = new BinaryTree( 3 );
          BinaryTree t5 = new BinaryTree( 5 );
          BinaryTree t7 = new BinaryTree( 7 );
          BinaryTree t2 = new BinaryTree( );
          BinaryTree t4 = new BinaryTree( );
          BinaryTree t6 = new BinaryTree( );
          BinaryTree t8 = new BinaryTree( );
          BinaryTree t9 = new BinaryTree( );
  
          t2.merge( 2, t1, t3 );
          t6.merge( 6, t5, t7 );
          t4.merge(4, t2, t6);
  </code></pre>
  
  <p>please say how write and how read that file
  (using java neatbeans)
  thx</p>