I have a problem where i want to see if the input user has enterd partially matches, or as long as majority matches with the answer, if it does then it should print out "Almost correct". For example lets say the answer is Football, but user instead puts in Footbol. It should then print out Almost correct.
here is what i tried. But the problem is that it just checks if the whole word is containd in ENG otherwise if even one Char is missing it doesnt work.
if (Answer.equalsIgnoreCase(ENG)){
r = "Correct";
}
else if (Answer.toLowerCase().contains(ENG.toLowerCase().)){
r = "Almost correct";
}
else {
r = "Wrong";
}
System.out.println(r)