I have a method that compares a person's name with other person's details. However, it may fail in scenarios where the middle name is included in the first name or other similar combinations.
I'm exploring potential solutions and would like to know if applying fuzzy logic is an appropriate approach, or if there's a simpler and more effective solution available. Thanks.
private boolean compareString(String compareFirstName, String compareMiddleName, String compareLastName) {
return firstName.equalsIgnoreCase(compareFirstName) &&
middleName.equalsIgnoreCase(compareMiddleName) &&
lastName.equalsIgnoreCase(compareLastName);
}
Concatenate the values.