The values() method returns an array that contains a list of enumeration constants. The general form of the values method is as follows:
The valueOf() method returns the enumeration constant that contains the value of the corresponding string. The general form of the values method is as follows:
All the declared enumerations contain the two methods automatically. In both general forms, enum-type will be the return type of the enumeration.
Download practice question and study guide for scja for exam. Pass SUN CX310-019 - SCJA
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
