Javatpoint Logo
Javatpoint Logo

Java Date toLocaleString() Method

The toLocaleString() method of Java Date class converts this date object into a String in implementation-dependent form.

This method is deprecated as of JDK version 1.1. It is replaced by DateFormat.format(Date date).

Syntax:

Parameters

NA

Return

The toLocaleString() returns a String representing this date object by using locale conventions.

Example

Test it Now

Output:

Current date to local string : 2 Oct 2018, 18:34:51

Next TopicJava Util Date





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA