when i try to run the program with example input 3,2,15,6,17 the output is [0, 0, 2, 6, 17], why is that? doesnt matter which numbers i enter there is always 2 numbers that get converted to 0
package com.codegym.task.task06.task0622;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
/*
Ascending numbers
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader rd = new BufferedReader(new InputStreamReader(System.in));
int[] arr = new int[5];
for (int i=0; i<5; i++ ) {
int input = Integer.parseInt(rd.readLine());
arr [i] = input;
Arrays.sort(arr);
}
System.out.println(Arrays.toString(arr));
}
}