@@ -0,0 +1,425 @@
+public class CountHi2 %7B%0A  public static void main (String... args) %7B%0A    // Result: 1.%0A    System.out.println (new CountHi2 ().countHi2 (%22ahixhi%22));%0A  %7D%0A  %0A  public int countHi2 (String str) %7B%0A    return str.equals(%22%22)%7C%7Cstr.indexOf (%22hi%22)==-1?0:(!str.substring(0,str.indexOf (%22hi%22)).contains (%22x%22)%7C%7Cstr.indexOf (%22xhi%22)==-1?1+countHi2 (str.substring(str.indexOf(%22hi%22)+2)):countHi2 (str.substring(str.indexOf(%22hi%22)+2)));%0A  %7D%0A%7D%0A

Create CountHi2.java