my_string is_prefix result
"banana" "ban" 1
"banana" "nan" 0
"banana" "abcd" 0
"banana" "bananan" 0
class Solution {
public int solution(String my_string, String is_prefix) {
int answer = 0;
if(my_string.length() >= is_prefix.length()){
if(is_prefix.equals(my_string.substring(0, is_prefix.length()))){
answer++;
}
}
return answer;
}
}