Java sorting numbers using algorithm : <p>I have a task to sort ints in ascending order. Task is designed to practice algorithms... but i used basic array sort method like this:</p>

<pre><code>BufferedReader reader  = new BufferedReader(new InputStreamReader(System.in));

    int a = Integer.parseInt((reader.readLine()));
    int b = Integer.parseInt((reader.readLine()));
    int c = Integer.parseInt((reader.readLine()));
    int d = Integer.parseInt((reader.readLine()));
    int e = Integer.parseInt((reader.readLine()));

    int[] ints = {a, b, c, d, e};
    Arrays.sort(ints);

    for(int i = 0; i&lt;5;i++)
    {
        System.out.println(ints[i]);
    }
</code></pre>

<p>Its not an algorithm for sure. How could i do this without sort method?</p>
