static boolean isDate(Object obj){
  return obj instanceof Date && obj.getClass() == Date.class;
}

static boolean isDate ( Object obj ) { return obj instanceof Date && obj . getClass ( ) == Date . class ; }
check whether this object is a date .
