Не понимаю что не так))
Если добавить пробелы ситуация не меняется)
package en.javarush.task.jdk13.task06.task0634;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
/*
Chess board
*/
public class Solution {
public static char[][] array;
public static void main(String[] args) {
//write your code here
Scanner console = new Scanner(System.in);
int size = console.nextInt();
array = new char[size][size];
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array.length; j++) {
if (i%2 ==0 && j%2 ==0) { //filling black "#" cells in even arrays with even indexes (0,2,4,6..))
array[i][j]='#';
}
if (i%2!=0 && j%2!=0){ //filling black "#" cells in odd arrays with odd indexes (0,2,4,6..))
array[i][j]='#';
}
}
}
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array.length; j++) {
if (array[i][j]=='#'){
System.out.print(array[i][j]);
}
}
System.out.println();
}
}
}