ZoneId of(String zoneId, Map aliasMap) example
Description
ZoneId of(String zoneId, Map<String,String> aliasMap)
creates
an instance of ZoneId using its ID using a map of aliases to supplement the standard zone IDs.
Syntax
of
has the following syntax.
public static ZoneId of(String zoneId, Map<String,String> aliasMap)
Example
The following example shows how to use of
.
import java.time.ZoneId;
import java.util.HashMap;
//from w w w .ja v a 2 s .co m
public class Main {
public static void main(String[] args) {
ZoneId z = ZoneId.of("UTC",new HashMap<>());
System.out.println(z);
}
}
The code above generates the following result.