title: How to compare elements of unequal length String arrays?
body: <p>How do I compare the elements of two different String arrays, of unequal lengths, to each other one-by-one.</p>
  
  <pre><code>  import java.util.List;
    import java.util.Scanner;
  
  
      public class ArrayComparison {
  
          public static void main(String[] args) {
  
              String list1[] = {"m99076", "m10141", "o87909", "o90876", "l17237"};
              String list2[] = {"1", "foo", "1", "m10141", "s3002", "bar", "1", "u39392", "n6233", "fubar", "1", "o87909", "z039"};
  
  
              for(int i = 0; [i] &lt; list1; i++){
                  for(int j = 0; [j] &lt; list2; j++){
  
                  }if (list1[i] == list2[j]);
                  System.out.println("The values are equal");
              } else
                  list1[i] != list2[j];
              }
      }
  </code></pre>