TimeZone getID() Method in Java with Examples
The getID() method of TimeZone class in Java is used to get official ID of a particular TimeZone.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
public String getID()
Parameters: The method does not take any parameters.
Return Value: The method returns the ID of the TimeZone.
Below programs illustrate the working of getID() Method of TimeZone:
The ID is: Pacific/Pago_Pago
The ID is: Europe/Rome