@@ -0,0 +1,151 @@
+int countXX(String str) %7B%0A  int count = 0;%0A  for (int i=0; i%3Cstr.length() - 1; i++) if (str.substring(i, i+2).equals(%22xx%22)) count++;%0A  return count;%0A%7D%0A

Create countXX.java