Java SimpleDateFormat.clone()
Syntax
SimpleDateFormat.clone() has the following syntax.
public Object clone()
Example
In the following code shows how to use SimpleDateFormat.clone() method.
import java.text.SimpleDateFormat;
//from w ww.java 2s . c om
public class Main {
public static void main(String[] argv) throws Exception {
SimpleDateFormat formatter = new SimpleDateFormat();
formatter.applyPattern("MMM");
System.out.println(formatter.clone().equals(new SimpleDateFormat()));
}
}
The code above generates the following result.