title: How to iterate string array for one column in java
body: <p>I have this code where <code>stringArray</code> contains 1000 words and <code>String[] a</code> contains words which are split into two columns <code>a[0]</code> and <code>a[1]</code>.</p>
  
  <p>So, now <code>a[0]</code> contains all words and <code>a[1]</code> contains keys and I want to compare <code>a[0]</code> with another array. How should I do this?</p>
  
  <pre><code>String[] stringArray = swn.mylist.toArray(new String[0]);
  String[] a = new String[stringArray.length+1];
  
  for(String words: stringArray) {  
      a = words.split("#");
      System.out.println(a[0]);
  }
  </code></pre>