@@ -0,0 +1,354 @@
+// http://codingbat.com/prob/p102145%0A%0Apublic boolean twoTwo(int%5B%5D nums) %7B%0A  for (int i = 0; i %3C nums.length; ++i) %7B%0A    boolean twoToTheLeft = (i-1 %3E= 0 && nums%5Bi-1%5D == 2);%0A    boolean twoToTheRight = (i+1 %3C nums.length && nums%5Bi+1%5D == 2);%0A    %0A    if (nums%5Bi%5D == 2 && !twoToTheLeft && !twoToTheRight) %7B%0A      return false;%0A    %7D%0A  %7D%0A  %0A  return true;%0A%7D%0A

Create twoTwo.java