Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Java
10.8K+ articles
Misc
8.8K+ 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 toInstant() Method in Java with Examples
Last Updated: 26 March 2019
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
Java
Java - util package
Java-Functions
Java-util-Date
Date from() method in Java with Examples
Last Updated: 26 March 2019
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
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
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
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
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
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
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
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
Java
Java - util package
Java-Functions
Java-util-Date
Date before() method in Java with Examples
Last Updated: 02 January 2019
The before() method of Java Date class tests whether the date is before the specified date or not. Syntax:public boolean before(Date when)Parameters: The function accepts ...
read more
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
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !