title: Is there any cleaner or more efficient way to achieve what my code is performing?
body: <p>I am trying to create a boolean that compares two Strings, and gets the percentage of characters that are a match in the two Strings specified. If the percentage is more than or equal to 80, return true. What I have so far works, but it feels kind of cheap-hacky, and I was wondering if there was a better way to do it. Here is what I have: </p>
  
  <pre><code>    public static boolean isMatch(String word, String comparison) {
      int matches = 0;
      char[] word_characters = word.toLowerCase().toCharArray();
      char[] comparison_characters = comparison.toLowerCase().toCharArray();
      int minLength = Math.min(word_characters.length, comparison_characters.length);
      int highest = (word_characters.length &gt; comparison_characters.length ? word_characters.length : comparison_characters.length);
      for(int i = 0; i &lt; minLength; i++) {
          if (word_characters[i] == comparison_characters[i]) {
              matches++;    
          }
      }
      int percent = (int) (matches * 100.0f) / highest;
      return percent &gt;= 80;
  }
  </code></pre>