Java TimeZone Clone() MethodThe clone() method of TimeZone class is used to create a copy of an object of TimerZone class. SyntaxReturnsIt Returns a clone of an object of TimeZone class Example 1Output: ORIGINAL OBJECT OF TIMERZONE CLASS: sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=19800000,dstSavings=0, useDaylight=false,transitions=7,lastRule=null] CLONE OBJECT OF TIMERZONE CLASS:sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=19800000,dstSavings=0, useDaylight=false,transitions=7,lastRule=null] Example 2Output: ORIGINAL OBJECT OF TIMERZONE CLASS: java.util.SimpleTimeZone[id=INDIA,offset=500,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] CLONE OBJECT OF TIMERZONE CLASS:java.util.SimpleTimeZone[id=INDIA,offset=500,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] Next TopicJava-timezone-getavailableids-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India