@@ -0,0 +1,358 @@
+public class CountAbc %7B%0A  public static void main (String... args) %7B%0A    //Result:2.%0A    System.out.println(new CountAbc ().countAbc (%22abcxxxabc%22));%0A  %7D%0A%0A  public int countAbc (String str) %7B%0A    return str.length () %3C 3?0:(str.substring (0,3).equals(%22abc%22)%7C%7Cstr.substring (0,3).equals(%22aba%22)?1+countAbc (str.substring(1)):countAbc (str.substring(1)));%0A  %7D%0A%7D%0A

Create CountAbc.java