What is mean by return 1, -1 and 0 ? What values does this method returns? : <p>/*
What values are return when I mention return 1, -1 and 0 in the method</p>

<p>I was writing thing this code to sort String based on there size
*/</p>

<pre><code>public int compare(String s1, String s2)
{
    int len1 = s1.length();
    int len2 = s2.length();

    if(len1 &gt; len2)
    {
        return 1;
    }
    else if (len1 &lt; len2)
    {
        return -1;
    }
    return 0;
}
</code></pre>
