Code example for Timestamp

0
    { 
      return new Time(date.getTime());
    } 
    if (targetType.equals(Timestamp.class))
    { 
      return new Timestamp(date.getTime());
    } 
 
    return new Date(date.getTime());
  } 
} 
Contextual code suggestions in your IDE  Get Codota for Java