title: Read data from file, and store it into an array to output the list
body: <p>what I'm trying to do here is get what is inside of a data/txt file and store it into an array. Right now I'm just trying to do the String, but ultimately I will like to get everything in the file to output. This is what is inside the txt file: </p>
  
  <p><strong>Honduras 130 Tegucigalpa
  Cuba 100 Habanna</strong></p>
  
  <p>I will like for the output to be the same in java.</p>
  
  <pre><code>import java.io.File;
  import java.util.Scanner;
  import java.util.ArrayList;
  
  
  public class ReadCountries2
  {
      public static void main(String [] args)throws Exception
      {
         String fName = "/Users/Edward Lavaire/Downloads/Countries.txt";
         Scanner s = new Scanner(new File(fName));
  
         String name [] = new String[6];
  
         while(s.hasNext())
         {
             int i = 0;
             name[i] = s.next();
             System.out.println(name[i]);
             i++;
        }
      }
  }
  </code></pre>