public static boolean isEqual(Double d1,Double d2){
  if (d1 == null || d2 == null) {
    return false;
  }
  return Math.abs(d1 - d2) < TOLERANCE;
}

public static boolean isEqual ( Double d1 , Double d2 ) { if ( d1 == null || d2 == null ) { return false ; } return Math . abs ( d1 - d2 ) < TOLERANCE ; }
tests whether the two decimal numbers are equal with a tolerance of 0 . 01 . if one or both of the numbers are null , false is returned .
