title: if condition in Java Anagram Class not validating the String properly. getting not an anagram for anagram string
body: <p>The below code working without error but it not getting proper result for anagram. The if condition is return false for correct value.</p>
  <pre><code>import java.util.*;
  
  public class Anagram{
      public boolean solve(String s1, String s2){
          if(s1.length() != s2.length()) return false;
          
          String[] s11 = s1.split(&quot;&quot;);
          String[] s12 = s2.split(&quot;&quot;);
  
          Arrays.sort(s11);
          System.out.println(Arrays.toString(s11));
          Arrays.sort(s12);
          System.out.println(Arrays.toString(s12));
  
          
          for(int i = 0; i &lt; s1.length(); i++){
              if(s11[i] != s12[i])
               System.out.println(s11[i]);
               System.out.println(s12[i]);
               return false;
          }
  
          return true;
      }
  
      public static void main(String[] args){
          String s1 = &quot;restful&quot;;
          String s2 = &quot;fluster&quot;;
  
          Anagram v = new Anagram();
  
          if(v.solve(s1, s2)){
              System.out.println(s2 + &quot; is anagram of the &quot; + s1);
          }else{
              System.out.println(&quot;not an anagram&quot;);
          }
      }
  }
  </code></pre>
  <p>Please let me know why it is not working</p>