Start New Discussion Reply to this Discussion add values to enums or change string
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;
}
}
rugae
Light Poster
27 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
dwks
Posting Whiz in Training
269 posts since Nov 2005
Reputation Points: 185
Solved Threads: 28
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.3109 seconds
using 2.76MB