Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
203 views
in Programming by
I have a scenario where I have to utilize hashmap values. Here key is Enum and value is of type String. Enum values keeps changing. I need to write loop so that I can iterate through each enum value and get appropriate value for the same.

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

This is what you should be doing.

 

for (ENumClass eNumClass : ENumClass.values()){
     //your code here.
}


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...