clone(): This method is available in java.util.SimpleTimeZone class of Java.
Syntax:
Object java.util.SimpleTimeZone.clone()
This method returns a clone of this SimpleTimeZone instance.
Parameters: NA
Returns: a clone of this instance.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;public class SimpleTimeZoneclone {public static void main(String[] args) {SimpleTimeZone simpleTimeZone =new SimpleTimeZone(100, "India");System.out.println(simpleTimeZone.clone());}}
Output:
java.util.SimpleTimeZone[id=India,offset=100,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0]
No comments:
Post a Comment