Java Date toString() Method

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.

Syntax:

Parameters

NA

Return

It returns a String representing this date object.

Example 1

Test it Now

Output:

date in String : Tue Sep 25 10:16:42 IST 2018

Next TopicJava Util Date




Latest Courses