title: Using for loop to get the Hamming distance between 2 strings
body: <p>In this task i need to get the Hamming distance (the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different - from Wikipedia) between the two strings sequence1 and sequence2. </p>
  
  <p>First i made 2 new strings which is the 2 original strings but both with lowered case to make comparing easier. Then i resorted to using the for loop and if to compare the 2 strings. For any differences in characters in these 2 pair of string, the loop would add 1 to an int x = 0. The returns of the method will be the value of this x. </p>
  
  <pre><code>public static int getHammingDistance(String sequence1, String sequence2) {
      int a = 0;
      String sequenceX = sequence1.toLowerCase();
      String sequenceY = sequence2.toLowerCase();
      for (int x = 0; x &lt; sequenceX.length(); x++) {
          for (int y = 0; y &lt; sequenceY.length(); y++) {
              if (sequenceX.charAt(x) == sequenceY.charAt(y)) {
                  a += 0;
              } else if (sequenceX.charAt(x) != sequenceY.charAt(y)) {
                  a += 1;
              }
          }
      }
      return a;
  }
  </code></pre>
  
  <p>So does the code looks good and functional enough? Anything i could to fix or to optimize the code? Thanks in advance. I'm a huge noob so pardon me if i asked anything silly</p>