В чем причина?
package com.javarush.task.jdk13.task06.task0634;
import java.util.Scanner;
/*
Шахматная доска
*/
public class Solution {
public static char[][] array;
public static void main(String[] args)
{
Scanner concol = new Scanner(System.in);
int N = concol.nextInt();
array = new char[N][N];
boolean check = true;
for(int i = 0; i < N; i++)
{
for(int j = 0; j < N; j++)
{
if(check)
{
array[i][j] = '#';
check = !check;
}else{
array[i][j] = ' ';
check = !check;
}
}
}
for(int i = 0; i < N; i++)
{
for(int j = 0; j < N; j++)
{
System.out.print(array[i][j]);
}
System.out.println();
}
//напишите тут ваш код
}
}