My code runs and i get the expected output but i cant get the 3rd of 4 conditions to be met to complete the task and i have no idea what im missing. any help appreciated
![]()

package en.codegym.task.jdk13.task06.task0634;
import java.util.Scanner;
/*
Chess board
*/
public class Solution {
public static char[][] array;
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num = input.nextInt();
array =new char [num][num];
boolean eve = num%2 == 0;
boolean white =false;
for(int i =0; i< array.length; i++){
for(int j =0; j< array[i].length; j++){
System.out.print(white ? " " : "#" );
white = !white;
}
if(eve)
white = !white;
System.out.println();
}
}
}