@@ -0,0 +1,904 @@
+package codingbat.array1;%0A%0Aimport java.util.Arrays;%0A%0A/* Start with 2 int arrays, a and b, of any length. %0A * Return how many of the arrays have 1 as their first element. %0A * %0A * start1(%7B1, 2, 3%7D, %7B1, 3%7D) = 2%0A * start1(%7B7, 2, 3%7D, %7B1%7D) = 1%0A * start1(%7B1, 2%7D, %7B%7D) = 1%0A * %0A */%0A%0Apublic class Start1Test %7B%0A%0A  public static void main(String%5B%5D args) %7B%0A%0A    Start1Test test = new Start1Test();%0A%0A    System.out.println(%22%3E%22%0A        + (test.start1(new int%5B%5D %7B 1, 2, 3 %7D, new int%5B%5D %7B 1, 3 %7D)) + %22%3C%22);%0A    System.out.println(%22%3E%22%0A        + (test.start1(new int%5B%5D %7B 7, 2, 3 %7D, new int%5B%5D %7B 1 %7D)) + %22%3C%22);%0A    System.out.println(%22%3E%22%0A        + (test.start1(new int%5B%5D %7B 1, 2 %7D, new int%5B%5D %7B%7D))%0A        + %22%3C%22);%0A  %7D%0A%0A  public int start1(int%5B%5D a, int%5B%5D b) %7B%0A    int counter = 0;%0A%0A    if (a.length %3E= 1)%0A      counter += (a%5B0%5D == 1) ? 1 : 0;%0A    if (b.length %3E= 1)%0A      counter += (b%5B0%5D == 1) ? 1 : 0;%0A%0A    return counter;%0A  %7D%0A%0A%7D%0A

add start1 array task