public static boolean assertIsNumber(final double a){
  if (!Double.isInfinite(a) && !Double.isNaN(a)) {
    return true;
  }
  throw new ExamException(a + " not finite number");
}

public static boolean assertIsNumber ( final double a ) { if ( ! Double . isInfinite ( a ) && ! Double . isNaN ( a ) ) { return true ; } throw new ExamException ( a + " not finite number" ) ; }
check if a double is a finite number ( not nan or infinite ) .
