Forums Register Login

Enum Issue

+Pie Number of slices to send: Send
Suppose I have


Is there any method to count the number of this enum and also loop to get each member of this enum?

Thnx
+Pie Number of slices to send: Send
If I remember correctly,

Test.values()

will give you an array of all Test instances, in the order they are declared.
1
+Pie Number of slices to send: Send
The following code solves your questions

Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1010 times.
Similar Threads
How to define constants for several classes?
enum parameter in method declaration
Can a enum class be dynmaically created
Enum inside an Enum
retrieve enumeration datatype into jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:22:43.