ZoneId getAvailableZoneIds() method in Java with Examples
The getAvailableZoneIds() method of the ZoneId class used to get the set of available zone IDs.This set includes all available region-based IDs.The ID can be passed to of(String) to create a ZoneId.The set of zone IDs can increase over time, although in a typical application the set of IDs is fixed.
public static Set getAvailableZoneIds()
Parameters: This method does not accepts any parameter.
Return value: This method returns Set which are a modifiable copy of the set of zone IDs.
Below programs illustrate the getAvailableZoneIds() method:
First ZoneId in list:Asia/Aden
ZoneId = Africa/Abidjan offset = Z ZoneId = Africa/Accra offset = Z ZoneId = Africa/Addis_Ababa offset = +03:00 ZoneId = Africa/Algiers offset = +01:00 ZoneId = Africa/Asmara offset = +03:00
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.