ResolverStyle values() method in Java with Examples Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The values() method of ResolverStyle enum is used to an array containing the units of this ResolverStyle, in the order, they are declared. Syntax: public static ResolverStyle[] values() Parameters: This method accepts nothing. Return value: This method returns an array containing the constants of this enum type, in the order, they are declared. Below programs illustrate the ResolverStyle.values() method: Program 1: Java // Java program to demonstrate // ResolverStyle.values() method import java.time.format.ResolverStyle; public class GFG { public static void main(String[] args) { // Get ResolverStyle instance ResolverStyle resolverStyle = ResolverStyle.valueOf(" SMART & quot;); // Get the constants using values() ResolverStyle[] array = resolverStyle.values(); // Print the values for (int i = 0; i & lt; array.length; i++) System.out.println(array[i]); } } Output:STRICT SMART LENIENT Program 2: Java // Java program to demonstrate // ResolverStyle.values() method import java.time.format.ResolverStyle; public class GFG { public static void main(String[] args) { // Get ResolverStyle instance ResolverStyle resolverStyle = ResolverStyle.valueOf(" LINIENT & quot;); // Get the constants using values() ResolverStyle[] array = resolverStyle.values(); // Print the values System.out.println(" ResolverStyle length : " + array.length); } } Output:ResolverStyle length: 3 Example: Java package abc; import java.io.*; import java.time.format.ResolverStyle; import java.util.Scanner; public class as { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print( "Enter a resolver style (smart, strict, lenient): "); String input = scanner.nextLine().toLowerCase(); ResolverStyle style = null; switch (input) { case "smart": style = ResolverStyle.SMART; break; case "strict": style = ResolverStyle.STRICT; break; case "lenient": style = ResolverStyle.LENIENT; break; default: System.out.println("Invalid input."); System.exit(0); } System.out.println("Resolver Style: " + style); } } Output: Enter a resolver style (smart, strict, lenient): strict Resolver Style: STRICT Comment More infoAdvertise with us Next Article ResolverStyle values() method in Java with Examples A AmanSingh2210 Follow Improve Article Tags : Java Java-Functions java.time.format package Java-ResolverStyle Practice Tags : Java Similar Reads ResolverStyle valueOf() method in Java with Examples The valueOf() method of a ResolverStyle enum is used to get the enum value of this type ResolverStyle with the specified name. Syntax: public static ResolverStyle valueOf(String name) Parameters: This method accepts a name as the parameter which is the name of the enum constant to be returned. Retur 1 min read SignStyle values() method in Java with Examples The values() method of SignStyle enum is used to an array containing the units of this SignStyle, in the order, they are declared. Syntax: public static SignStyle[] values() Parameters: This method accepts nothing. Return value: This method returns an array containing the constants of this enum type 1 min read TextStyle values() method in Java with Examples The values() method of TextStyle enum is used to an array containing the constants of this enum type, in the order, they are declared. Syntax: public static TextStyle[] values() Parameters: This method accepts nothing. Return value: This method returns an array containing the constants of this enum 1 min read Provider values() method in Java with Examples The values() method of java.security.Provider class is used to return an unmodifiable Collection view of the property values contained in this provider.Syntax: public Collection<Object> values() Return Value: This method returns a collection view of the values contained in this map.Below are t 3 min read SortedMap values() method in Java with Examples The values() method of SortedMap interface in Java is used to create a collection out of the values of the map. It basically returns a Collection view of the values in the Map. Syntax: SortedMap.values() Parameters: The method does not accept any parameters. Return Value: The method is used to retur 2 min read SignStyle valueOf() method in Java with Examples The valueOf() method of SignStyle enum is used to return the enum of this type SignStyle with the specified name. Syntax: public static SignStyle valueOf(String name) Parameters: This method accepts a name as the parameter which is the name of the enum constant to be returned. Return value: This met 1 min read TreeMap values() Method in Java with Examples In Java, the values() method of the TreeMap class is present inside java.util package which is used to create a collection out of the values of the map. It basically returns a Collection view of the values in the TreeMap. --> java.util package --> TreeMap class --> values() Method Syntax: T 2 min read Properties equals(value) method in Java with Examples The equals(value) method of Properties class is used to check for equality between two properties. It verifies whether the elements of one properties object passed as a parameter is equal to the elements of this properties or not. Syntax: public boolean equals(Object value) Parameters: This method a 2 min read Map Values() Method in Java With Examples Map Values() method returns the Collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. Syntax: map.values() Parameter: This method does not take any parameter. Return value: It returns a collect 2 min read Properties contains(value) method in Java with Examples The contains(value) method of Properties class is used to check if this Properties object contains any mapping of this value for any key present in it. It takes this value to be compared as a parameter and returns a boolean value as a result. This method is more expensive than the containsKey() meth 2 min read Like