Output file not being created
<p>I am trying to create an output.txt file, the code is compiling with no errors, but the o/p file is not being created. Any help please?</p>

<pre><code> import java.io.*;

public class StudentPoll_dasariHaritha {

public static void main( String args[] )
 {
int frequency[] = new int[ 6 ];

  try {
 BufferedInputStream pollNumbers =
 new BufferedInputStream( new FileInputStream( "numbers.txt" ) );

try {
 // for each answer, use that value as subscript to
 // determine element to increment
while( true ) {
        ++frequency[ pollNumbers.read() ];
     }
 }

 catch( EOFException eof ) {
  }

 String output = "Rating\tFrequency\r\n";

 // append frequencies to String output
 for ( int rating = 1; rating &lt; frequency.length; rating++ ) {
        output += rating + "\t" + frequency[ rating ] + "\r\n";
     }



 BufferedWriter writer =
 new BufferedWriter( new FileWriter( "output.txt" ) );
 writer.write( output );
 writer.close();



 pollNumbers.close();

 System.exit( 0 );

 }

 catch( IOException io ) {

   System.exit( 1 );
   }   
</code></pre>

<p>Can someone explain me y this code is not creating the output text file?</p>
