@@ -0,0 +1,222 @@
+// http://codingbat.com/prob/p194667%0A%0Aint countXX(String str) %7B%0A  int xxCount = 0;%0A  for (int i = 0; i %3C str.length()-1; ++i) %7B%0A    if (str.substring(i, i+2).equals(%22xx%22)) %7B%0A      xxCount++;%0A    %7D%0A  %7D%0A  return xxCount;%0A %7D%0A

Create countXX.java