TimeZone.getID() has the following syntax.
public String getID()
In the following code shows how to use TimeZone.getID() method.
// ww w . j a v a 2 s . c o m import java.util.TimeZone; public class Main { public static void main( String args[] ){ TimeZone timezone = TimeZone.getTimeZone("Europe/Paris"); // checking ID of this time zone System.out.println("ID value is :" + timezone.getID()); } }
The code above generates the following result.