I was wondering if it's possible to change or add values to enum types? Such as changing the string "This is a msg" or add additional value to the type test.
May I have some tips?

public enum Test {
        VALUE("This is a msg");
                
        private String x;
        
        Test (String y) {
            setX(y);
        }
        public void setX(String y) {
            x = y;
        }            
        public String getX(){        
            return x;
        }
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.