enter image description here[enter image description here][2]I have tried getting rid of the local variable and making i increment but x.length() but that produces a yellow underline as well. Does anyone know what I'm missing?
public static boolean isCat(String s, String x) {
int xlen = x.length();
for (int i = 0; i < s.length(); i += xlen) {
if (s.substring(0, i).equals(x)) {
return true;
}
return false;
}
}