DateFormat.clone() has the following syntax.
public Object clone()
In the following code shows how to use DateFormat.clone() method.
import java.text.DateFormat; public class Main { public static void main(String args[]) { DateFormat df1 = DateFormat.getDateInstance(); System.out.println(df1.clone().equals(df1)); } }
The code above generates the following result.