Date class is available in
java.util package, it represents a specific instant of time, with millisecond precision. Date allows the interpretation of dates as year, month, day, hour, minute, and second values. It also allows the formatting and parsing of date strings.
Date Constructors:
Date Methods:
Simple Date Format Codes:
Date Example CODE import java.util.*; OUTPUT Fri Apr 18 14:25:43 IST 2014 DESCRIPTION In this program, at THINGS TO TRY
Date Methods CODE import java.text.SimpleDateFormat; OUTPUT The date1 is after date2 : true DESCRIPTION In this program, At THINGS TO TRY
|