Can you please tell me why this code reads only 2 elements of an array and then displays character codes?

import java.io.*; import java.io.IOException; public class Program { public static void main(String args[]) throws IOException { System.out.println("Hello WORLD!!!"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int numbers[] = new int [5]; System.out.println("Введите массив"); for(int i=0; i<5; i++) { numbers[i] = br.read(); } System.out.println(); for(int i=0; i<5; i++) { System.out.println(numbers[i]); } } } 

    1 answer 1

     numbers[i] = Integer.parseInt(br.readLine()); 

    but if you want easier, use the scanner (nextInt ())