public static boolean isFloat(Class type) throws Exception {
  if (type == Double.class) {
    return true;
  }
  if (type == Float.class) {
    return true;
  }
  if (type == float.class) {
    return true;
  }
  if (type == double.class) {
    return true;
  }
  return false;
}

public static boolean isFloat ( Class type ) throws Exception { if ( type == Double . class ) { return true ; } if ( type == Float . class ) { return true ; } if ( type == float . class ) { return true ; } if ( type == double . class ) { return true ; } return false ; }
this is used to determine if the type specified is a floating point type . types that are floating point are the double and float primitives as well as the java types for this primitives .
