VOOZH about

URL: https://www.geeksforgeeks.org/java/zoneoffset-getavailablezoneids-method-in-java-with-examples/

⇱ ZoneOffset getAvailableZoneIds() method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

ZoneOffset getAvailableZoneIds() method in Java with Examples

Last Updated : 13 Dec, 2018
The getAvailableZoneIds() method of the ZoneOffset class of java.time package is 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. Syntax:
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 examples illustrate the ZoneOffset.getAvailableZoneIds() method: Example 1:
Output:
First ZoneId in list:Asia/Aden
Example 2:
Output:
First ZoneId in list:Asia/Aden
Reference: Oracle Doc
Comment