Skip to content
Advertisement

How can i create Enum in Java? [closed]

I already created Enum. But i cannot create new Enum. I wanna create and compare 2 Enums actually. The X value is coming from backend. It’s a dynamic value. I wanna make this;

JavaScript
JavaScript

Advertisement

Answer

So what you are actually trying to achieve is to find the enum constant that has the same text. You can to that like this:

JavaScript

and then use the code like this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement