Anagram algorithm in java
<p>I would like to make anagram algorithm but
This code doesn't work. Where is my fault ? 
For example des and sed is anagram but output is not anagram
Meanwhile I have to use string method. not array. :)</p>

<pre><code>public static boolean isAnagram(String s1 , String s2)
{
    String delStr="";
    String newStr="";

    for(int i=0;i&lt;s1.length();i++)
    {
        for(int j=0 ; j &lt; s2.length() ; j++)
        {
            if(s1.charAt(i)==s2.charAt(j))
            {
                delStr=s1.substring(i,i+1);
                newStr=s2.replace(delStr,"");
            }
        }           
    }

    if(newStr.equals(""))
        return true;
    else
        return false;
}
</code></pre>
