ZoneOffset getAvailableZoneIds() method in Java with Examples Last Updated : 13 Dec, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report 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: Java // Java code to illustrate getAvailableZoneIds() method import java.time.*; import java.util.*; public class GFG { public static void main(String[] args) { // Get the ZoneOffset instance ZoneOffset zoneOffset = ZoneOffset.of("+05:30"); // get available zones // using getAvailableZoneIds() Set<String> zoneIds = zoneOffset.getAvailableZoneIds(); // print first record System.out.println("First ZoneId in list:" + zoneIds.iterator().next()); } } Output: First ZoneId in list:Asia/Aden Example 2: Java // Java code to illustrate getAvailableZoneIds() method import java.time.*; import java.util.*; public class GFG { public static void main(String[] args) { // Get the ZoneOffset instance ZoneOffset zoneOffset = ZoneOffset.of("Z"); // get available zones // using getAvailableZoneIds() Set<String> zoneIds = zoneOffset.getAvailableZoneIds(); // print first record System.out.println("First ZoneId in list:" + zoneIds.iterator().next()); } } Output: First ZoneId in list:Asia/Aden Reference: Oracle Doc Comment More infoAdvertise with us Next Article ZoneOffset getRules() method in Java with Examples C code_r Follow Improve Article Tags : Java Java-Functions Java-time package Java-ZoneOffset Practice Tags : Java Similar Reads ZoneOffset getTotalSeconds() method in Java with Examples The getTotalSeconds() method of ZoneOffset Class in java.time package is used to obtain total number of seconds in this instance of ZoneOffset. This method does not takes any parameter and returns an int value. which is the total number of seconds. Syntax: public static int getTotalSeconds() Paramet 1 min read ZoneOffset getId() method in Java with Examples The getId() method of ZoneOffset Class in java.time package is used to obtain offset ID in this instance of ZoneOffset. This method does not takes any parameter and returns an String value. which is the offset ID. Syntax: public static String getId() Parameters: This method accepts do not accepts an 1 min read ZoneOffset getRules() method in Java with Examples The getRules() method of ZoneOffset Class in java.time package is used to get the associated time-zone rules of this ZoneOffset instance. This method takes returns ZoneRules of this ZoneOffset instance. Syntax: public ZoneRules getRules() Parameters: This method do not accepts any parameter. Return 1 min read ZoneOffset getDisplayName() method in Java with Examples The getDisplayName() method of the ZoneOffset class is used to get the textual representation of the zone suitable for presentation to the user such as 'British Time' or '+02:00'.If no textual mapping is found then the full ID is returned. Syntax: public String getDisplayName(TextStyle style, Locale 2 min read TimeZone getAvailableIDs() Method in Java with Examples The getAvailableIDs() method of TimeZone class in Java is used to get the list of all the supported and available IDs in the TimeZone class. Syntax: public static String[] getAvailableIDs() Parameters: The method does not take any parameters. Return Value: The method returns an array of all the avai 4 min read ZoneOffset hashCode() method in Java with Examples The hashCode() method of ZoneOffset Class in java.time package is used to obtain hashCode value of this instance of ZoneOffset. This method does not takes any parameter and returns an int value. which is the hashCode value. Syntax: public static int hashCode() Parameters: This method accepts do not 1 min read Like