title: How do I write String arrays to a text file in java using Printwriter?
body: <p>I need help writing some contents of array objects (following are two example of arrays I'm using) to a text file using Printwriter. Any ideas? I'm a beginner, so the simpler the better, thanks!  </p>
  
  <pre><code>Astronauts[0][0] = new Passengers(-1, "", 1, 0, 0, "", "", 0, "", "", "", "", ""); 
  
  Astronauts[0][1] = new Passengers(0, "Pilot", 2424, 14, 0, "Bruce", "Banner", 0, "678-884-6325", "Mom", "678-884-6323","","");
  
  Astronauts[0][2] = new Passengers(0, "Pilot", 1248, 3, 0, "Sally", "Forth", 0, "678-921-1135", "Hannah", "678-921-1130","","");
  
  
   Astronauts[1][0] = new Passengers(-1, "", 2, 0, 0, "", "", 0, "", "", "", "", "");
  
  Astronauts[1][1] = new Passengers(0, "Pilot", 1022, 55, 0, "Buz", "Aldrin", 0, "404-014-4553", "June", "404-014-4555","","");
  
  Astronauts[1][2] = new Passengers(0, "Pilot", 2813, 8, 0, "Alice", "Dyer", 0, "678-884-6325", "Mom", "678-884-6323","","");
  </code></pre>