Javatpoint Logo
Javatpoint Logo

Java Locale clone() method

The clone() method of Java Locale class is used to create a copy of this locale. This method returns the clone of this instance.

Syntax

Parameter

NA

Return

This method returns a clone of this instance.

Example 1

Test it Now

Output:

Locale1:  company_JAVATPOINT
Locale2:  company_JAVATPOINT

Example 2

Test it Now

Output:

Locale1: company_JAVATPOINT
Locale2: branch_CS
Locale3: branch_CS

Example 3

Test it Now

Output:

Locale1: company_JAVATPOINT
Locale2: company_JAVATPOINT
Locale3: company-name_SSSIT
Locale4: company-name_SSSIT
Next TopicJava Locale



Help Others, Please Share

facebook twitter pinterest