Java-Enumeration Methods

Enumeration Methods All enumerations automatically contain two predefined methods values( ) and valueOf( ). The values( ) method returns an array that contains a list of the enumeration constants. The valueOf( ) method returns the enumeration content whose value corresponding to the string passed to it. The following program demonstrates the values( ) and valueOf( … Read more…