private boolean isSymmetricAndHasZeroDiagonal() throws NonZeroDiagonalException 
	{
		boolean execute = true, result = true ;
		
		for(int i = 0 ; i < this.row ; i++) {
        	for(int j = 0 ; j < this.col ; j++) {
        		if(i != j && matrix[i][j] != matrix[j][i]) {
        			//If the current entry is not on the main diagonal, and given that current entry
        			//is matrix[i][j] and it is not equal to matrix[j][i] then the matrix is not
        			//symmetric, so it must be fixed.
        			System.out.print("matrix[" + i + "][" + j + "] = " + matrix[i][j] + " ") ;
        			System.out.println("matrix[" + j + "][" + i + "] = " + matrix[j][i] + "\n Fixing matrix to be "
        					+ "symmetric...") ;
        			
        			if(matrix[i][j] == 0) {
        				matrix[i][j] = 1 ;
        			} else {
        				matrix[j][i] = 1 ;
        			}

        			if(execute == true) {
        				result = false ;
        				//If any one entry comparison for symmetry returns false then there is
        				//no point in setting result false again and again, so set execute to
        				//to false to prevent this line from executing.
        				execute = false ;
        			}
        		
        		//If an entry on the main diagonal is not 0 then an exception is thrown.
        		} else if(i == j && matrix[i][j] != 0) {
        			throw new NonZeroDiagonalException("Diagonal entries are not all zero.") ;
        		}
        	}
        }
		return result ;
	}