хелп( как сделать так чтобы с консоли считывалось 9 чисел которые мы вводим. У меня только 3 считывается. Плюс я не понимаю почему не проходит решение, в Intellej все правильно и выдает максимальное число.
package com.javarush.task.jdk13.task06.task0624;
import java.util.Scanner;
/*
Максимальный элемент
*/
public class Solution {
public static int[][] array = new int[3][3];
public static void main(String[] args) {
//напишите тут ваш код
int maximumOfNumbers = Integer.MIN_VALUE;
Scanner console = new Scanner(System.in);
for (int i= 0; i < array.length; i++){
for (int j = i+1; j < array.length; j++) {
array[i][j] = console.nextInt();
if (array[i][j] > maximumOfNumbers){
maximumOfNumbers = array[i][j];
}
}
}
System.out.println(maximumOfNumbers);
}
}