SimpleTimeZone.clone() has the following syntax.
public Object clone()
In the following code shows how to use SimpleTimeZone.clone() method.
/*from w w w. jav a 2s .c o m*/ import java.util.SimpleTimeZone; public class Main { public static void main( String args[] ){ SimpleTimeZone stobj = new SimpleTimeZone(720,"India"); System.out.println("Origial obj: " + stobj); // clone the object Object cloneObj = stobj.clone(); System.out.println("Clone obj: " + cloneObj); } }
The code above generates the following result.