best way to read data from a file
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4716503/best-way-to-read-a-text-file">Best way to read a text file</a>  </p>
</blockquote>



<p>In Java I can open a text file like this:</p>

<pre><code>BufferedReader reader = new BufferedReader(new FileReader("file.txt"));
</code></pre>

<p>My question is, how do you read from the following file? The first line is a number (830) representing number of words, and the following lines contain the words.</p>

<pre><code>830  
cooking   
English  
weather  
.  
.  
</code></pre>

<p>I want to read the words into a string array. But how do I read the data first?</p>
