Say I have an enum which is just
public enum Blah {
A, B, C, D
}
and I would like to find the enum value of a string, for example "A"
which would be Blah.A
. How would it be possible to do this?
Is the Enum.valueOf()
the method I need? If so, how would I use this?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…