What does s.equals("") mean in Java? [on hold]
Here is the full code I saw and I am trying to wrap my head around it:
for (i = 0; i < s.length - 1; i++) {
if (s.charAt(i - 1) == b && s.charAt(i) != a) {
return false;
}
}
return !s.endsWith(String.valueOf(b));
Could anyone explain?
No comments:
Post a Comment