ZoneId of(String zoneId)
creates
an instance of ZoneId from an ID.
of
has the following syntax.
public static ZoneId of(String zoneId)
The following example shows how to use of
.
import java.time.ZoneId; 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.