title: How to check if an array in an arraylist contains a certain value?
body: <p>I have an array list which contains arrays of type String. I create the array list and add arrays to it with the following code:</p>
  
  <pre><code>List&lt;String[]&gt; transaction = new ArrayList&lt;String[]&gt;();
  
  String[] transactionLine = new String[7];
  transactionLine[0] = "0";
  transactionLine[1] = "1";
  //.....
  transactionLine[6] = "some value";
  
  transactionLines.add(transactionLine);
  </code></pre>
  
  <p>Now I want to test if one of the arrays contain a certain value. I tried it like this, but then it checks for an array and not an element of an array:</p>
  
  <pre><code>if(transactionLines.contains("some value")) { 
       //Do some stuff with it
  }
  </code></pre>
  
  <p>I know this doesn't work, but I don't now how to do it otherwise. I couldn't find any post of this already on Stackoverflow (not with the logical search terms for this problem anyway).</p>
  
  <p>Note: I have chosen this structure of arrays in an arraylist, because I have a fixed number of columns (as suggested in <a href="https://stackoverflow.com/questions/2707357/how-to-create-dynamic-two-dimensional-array-in-java">how to create dynamic two dimensional array in java?</a>).</p>
  
  <p>Any help is greatly appreciated!</p>