This is probably a very silly question but I am trying to print this output so that it only prints out what is in the system.out.println's not true/false. So in other words I want to get rid of the true/false.
I know there are other issues such as my if (magic == false)
method but I just want to focus on getting rid of the true/false.
public boolean magic() {
boolean diagMagic;
diagMagic = sumOtherDiag() == sumMainDiag();
int[] colArray = new int[square.length];
int[] rowArray = new int[square.length];
for (int k = 0; k < square.length; k++) {
rowArray[k] = sumRow(k);
}
for (int i = 0; i < square.length; i++) {
colArray[i] = sumCol(i);
}
boolean ifMagic = rowArray.equals(colArray);
boolean magic = ifMagic == diagMagic;
if(magic == false) {
System.out.println("This is a Magic Square");
} else
System.out.println("This is NOT a Magic Square");
return diagMagic;