private static int search(String maxString,String minString) {
int counts = 0;
int index = maxString.indexOf(minString);
while(index != -1){
maxString = maxString.substring(index+minString.length());
counts++;
index = maxString.indexOf(minString);
}
return counts;
} |
|