Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Python
19.6K+ articles
Experiences
15.8K+ articles
Java
9.4K+ articles
Misc
7.7K+ articles
Java-Functions
4.2K+ articles
Java - util package
1.6K+ articles
Java-Library
71+ articles
Java-Date-Time
51+ articles
Java-util-Date
12 posts
Recent Articles
Popular Articles
Date from() method in Java with Examples
Last Updated: 11 July 2025
The from(Instant inst) method of Java Date class returns an instance of date which is obtained from an Instant object.Syntax:public static Date from(Instant inst)Parameter...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date clone() method in Java with Examples
Last Updated: 01 November 2020
The clone() method of Date class in Java returns the duplicate of the passed Date object. This duplicate is just a shallow copy of the given Date object.Syntax:public Obje...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date toInstant() Method in Java with Examples
Last Updated: 11 July 2025
The toInstant() method of Date class in Java is used to convert a Date object to an Instant object. An Instant is created during the conversion which is used to represent ...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date getTime() method in Java with Examples
Last Updated: 02 January 2019
The getTime() method of Java Date class returns the number of milliseconds since January 1, 1970, 00:00:00 GTM which is represented by Date object.Syntax:public long getTi...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date hashCode() method in Java with Examples
Last Updated: 07 November 2019
The hashCode() method of Java Date class returns a value which is a hash code for this object.Syntax:public int hashCode()Parameters: The function does not accept any para...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date equals() method in Java with Examples
Last Updated: 02 January 2019
The equals() method of Java Date class checks if two Dates are equal, based on millisecond difference. Syntax:public boolean equals(Object obj)Parameters: The function acc...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date toString() method in Java with Examples
Last Updated: 02 January 2019
The toString() method of Java Date class converts this date object into a String in form "dow mon dd hh:mm:ss zzz yyy". This method overrides toString in class object.Synt...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date compareTo() method in Java with examples
Last Updated: 07 November 2019
The compareTo() method of Java Date class compares two dates and sort them for order. Syntax:public int compareTo(Date anotherDate)Parameters: The function accepts a singl...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date setTime() method in Java with Examples
Last Updated: 07 November 2019
The setTime() method of Java Date class sets a date object. It sets date object to represent time milliseconds after January 1, 1970 00:00:00 GMT. Syntax:public void setTi...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date before() method in Java with Examples
Last Updated: 26 December 2025
Date.before() method in Java checks if one date occurs before another specified date. It returns true if the calling date is earlier, and false otherwise. If the specified...
read more
Misc
Java
Java - util package
Java-Functions
Java-util-Date
Date after() method in Java
Last Updated: 07 November 2019
The java.util.Date.after() method is used to check whether the current instance of the date is after the specified date.Syntax:dateObject.after(Date specifiedDate)Paramete...
read more
Java
Java - util package
Java-Functions
Java-Date-Time
Java-util-Date
util.date class methods in Java with Examples
Last Updated: 08 September 2021
Following are some important date class methods : .toString() : java.util.Date.tostring() method is a java.util.Date class method.It displays ...
read more
Java
Java-Library
Java - util package
Java-Date-Time
Java-util-Date