Why is the following algorithm not halting for me? (str is the string I am searching in, findStr is the string I am trying to find)
String str = \"helloslkhe
A shorter version. ;)
String str = "helloslkhellodjladfjhello"; String findStr = "hello"; System.out.println(str.split(findStr, -1).length-1);