I am looking for a method that will take two strings and return the number of characters that are common …