How i can get the maximum version?
<p>How can I sort <code>String</code> array </p>

<pre><code>String[] s = {"0.1","0.3","0.6","0.4","0.5","0.2","0.7","0.8","0.9","0.10"};
</code></pre>

<p>By sort I dont mean here Converting it into Integer and get the result as <code>0.9</code> . </p>

<p>Here I want to get the value as <code>0.10</code> .</p>

<p>Here in this case if the string array contains <code>1.1</code> then the max value will be <code>1.1</code> .</p>

<p>I am able to get the max value if the array is like this i.e.</p>

<pre><code>String[] s = {"0.1","0.4","0.3","0.4","0.5","0.2","0.7","1.8","2.9","3.1"};
</code></pre>

<p>My code will work for this string array but suppose if the </p>

<pre><code>String[] s = {"0.1","1.4","1.3","0.4","0.5","0.2","2.7","1.8","2.9","0.1"};
</code></pre>

<p>My code.</p>

<pre><code>public String createNewVersion(
            String[] entityVersionHistory) {

Map&lt;Integer, List&lt;Integer&gt;&gt; m_Map1 = new HashMap&lt;Integer, List&lt;Integer&gt;&gt;(); 

String prevKey = "0";
String currentKey = null;

List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();

for (String str : entityVersionHistory) 
{
    String[] splitVersion = str.split("\\.");
    currentKey = splitVersion[0];
    if(!prevKey.equals(currentKey))
    {
        Integer s = new Integer(splitVersion[1]);

        m_Map1.put(Integer.valueOf(prevKey), list);
        list = new ArrayList&lt;Integer&gt;();
        list.add(s);

        prevKey = currentKey;
    }
    else
    {
        Integer s = new Integer(splitVersion[1]);
        list.add(s);
    }
}
m_Map1.put(Integer.valueOf(prevKey), list);
</code></pre>

<p>How I can achieve this?</p>
