title: How do I fill a String array in one method with data from another?
body: <p>After meddling with arrays and countless google searches, I can't seem to find the answer.</p>
  
  <pre><code>    public static void main(String args[]){
          String[] names = new String[4]; //I want to fill this up with data from country
          country(names);
          System.out.println(names(0)) //I want this to display Madrid
      }
  
      public static void country(String[] names){
          names[0] = "Madrid"; 
          names[1] = "Berlin";
          return;
      }
  </code></pre>
  
  <p>I'm not sure if this explains what I'm trying to do. </p>