How do I count the amount of times a substring appears in a string? So far I have
static boolean doesAppear(String a, String b){
boolean appears;
appears = (b.indexOf(a) != -1) ? true : false;
return appears;
}
to confirm that it does appear, but I can't figure out how to adjust it to return true for counts >= 2.