title: Extract the difference between two strings in Java
body: <p>Hi I have two strings :</p>
  
  <pre><code>    String hear = "Hi My name is Deepak"
              + "\n"
              + "How are you ?"
              + "\n"
              + "\n"
              + "How is everyone";
      String dear = "Hi My name is Deepak"
              + "\n"
              + "How are you ?"
              + "\n"
              + "Hey there \n"
              + "How is everyone";
  </code></pre>
  
  <p>I want to get what is not present in the hear string that is "Hey There \n". I found a method , but it fails for this case :</p>
  
  <pre><code>static String strDiffChop(String s1, String s2) {
      if (s1.length() &gt; s2.length()) {
          return s1.substring(s2.length() - 1);
      } else if (s2.length() &gt; s1.length()) {
          return s2.substring(s1.length() - 1);
      } else {
          return "";
      }
  }
  </code></pre>
  
  <p>Can any one help ?</p>