В чем дело....?
package com.javarush.task.task06.task0622;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Числа по возрастанию
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int[] input = new int[5];
for (int x = 0; x < 5; x++) {
input[x] = Integer.parseInt(reader.readLine());
}
int min,minIndex = 0;
for (int count = 0; count < 4; count++) {
min = input[count];
for (int count2 = count; count2 < 5; count2++) {
if (input[count2] < min) {
min = input[count2];
minIndex = count2;
}
}
input [minIndex] = input [count];
input[count] = min;
}
for (int x = 0; x < 5; x++) {
System.out.println(input[x]);
}
}
}