- Java.util - WeakHashMap
- Java.util - Vector
- Java.util - UUID
- Java.util - TreeSet
- Java.util - TreeMap
- Java.util - TimeZone
- Java.util - TimerTask
- Java.util - Timer
- Java.util - StringTokenizer
- Java.util - Stack
- Java.util - SimpleTimeZone
- Java.util - ServiceLoader
- Java.util - Scanner
- Java.util - ResourceBundle.Control
- Java.util - ResourceBundle
- Java.util - Random
- Java.util - PropertyResourceBundle
- Java.util - PropertyPermission
- Java.util - Properties
- Java.util - PriorityQueue
- Java.util - Observable
- Java.util - Locale
- Java.util - ListResourceBundle
- Java.util - LinkedList
- Java.util - LinkedHashSet
- Java.util - LinkedHashMap
- Java.util - IdentityHashMap
- Java.util - Hashtable
- Java.util - HashSet
- Java.util - HashMap
- Java.util - GregorianCalendar
- Java.util - Formatter
- Java.util - EnumSet
- Java.util - EnumMap
- Java.util - Dictionary
- Java.util - Date
- Java.util - Currency
- Java.util - Collections
- Java.util - Calendar
- Java.util - BitSet
- Java.util - Arrays
- Java.util - ArrayList
- Java.util - ArrayDeque
- Java.util - Home
Java.util Package Extras
- Java.util - Discussion
- Java.util - Useful Resources
- Java.util - Enumerations
- Java.util - Exceptions
- Java.util - Interfaces
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.util.Date Class
Introduction
The java.util.Date class represents a specific instant in time, with milpsecond precision.
Class declaration
Following is the declaration for java.util.Date class −
pubpc class Date extends Object implements Seriapzable, Cloneable, Comparable<Date>
Class constructors
Sr.No. | Constructor & Description |
---|---|
1 | Date() This constructor allocates a Date object and initiapzes it so that it represents the time at which it was allocated, measured to the nearest milpsecond. |
2 | Date(long date) This constructor allocates a Date object and initiapzes it to represent the specified number of milpseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT. |
Class methods
Sr.No. | Method & Description |
---|---|
1 | This method tests if this date is after the specified date. |
2 | This method tests if this date is before the specified date. |
3 | This method return a copy of this object. |
4 | This method compares two Dates for ordering. |
5 | This method compares two dates for equapty. |
6 | This method returns the number of milpseconds since January 1, 1970, 00:00:00 GMT represented by this Date object. |
7 | This method returns a hash code value for this object. |
8 | This method sets this Date object to represent a point in time that is time milpseconds after January 1, 1970 00:00:00 GMT. |
9 | This method converts this Date object to a String of the form. |
Methods inherited
This class inherits methods from the following classes −
java.util.Object