Soru soruları baya bir zaman olmuş ama merak eden arkadaşlar için; gerekli döngü,
//www.turkishcode.com
for (int i = 0; i < 7; i++) {
System.out.print(i % 2);
for (int j = 1; j < 7; j++) {
System.out.print(" - " + (j + i) % 2);
}
System.out.println("");
}Çıktı :
0 - 1 - 0 - 1 - 0 - 1 - 0
1 - 0 - 1 - 0 - 1 - 0 - 1
0 - 1 - 0 - 1 - 0 - 1 - 0
1 - 0 - 1 - 0 - 1 - 0 - 1
0 - 1 - 0 - 1 - 0 - 1 - 0
1 - 0 - 1 - 0 - 1 - 0 - 1
0 - 1 - 0 - 1 - 0 - 1 - 0