how to sort array in java and convert to string
<pre><code>public class Sort {

/**
 * @param args
 */
public static void main(String[] args) {
    // TODO Auto-generated method stub
    int num[] = { -1, 11, 3, 34, 5, 99, 10 };
    int length = num.length;
    int temp = 0;
    int jj;
    String printinstring ="";
    for (int i = 0; i &lt; length; i++) {
        for (int j =1; j &lt; length; j++) {
            if (num[j-1] &gt; num[j]) {
                temp = num[j-1];
                num[j-1]=num[j];
                num[j]=temp;
            }

        }




    }
    for (int i = 0; i &lt; length; i++) {
        System.out.println(num[i]);
        printinstring=printinstring+Integer.toString(num[i]);

    }

    System.out.println(printinstring);
}
}
</code></pre>

<p>the out put is</p>

<pre><code>-1
3
5
10
11
34
99
-13510113499
</code></pre>

<p>if we change &lt;
then out put is 99---</p>
