ZoneId of(String zoneId) example
Description
ZoneId of(String zoneId)
creates
an instance of ZoneId from an ID.
Syntax
of
has the following syntax.
public static ZoneId of(String zoneId)
Example
The following example shows how to use of
.
import java.time.ZoneId;
/* ww w . ja v a 2s . com*/
public class Main {
public static void main(String[] args) {
ZoneId z = ZoneId.of("UTC");
System.out.println(z);
}
}
The code above generates the following result.