getID(): This method is available in java.util.SimpleTimeZone class of Java.
Syntax:
String java.util.TimeZone.getID()
This method gets the ID of this time zone.
Parameters: NA
Returns: the ID of this time zone.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;public class SimpleTimeZonegetID {public static void main(String[] args) {SimpleTimeZone simpleTimeZone =new SimpleTimeZone(100, "India");System.out.println(simpleTimeZone.getID());}}
Output:
India
No comments:
Post a Comment