Skip to main content

Convert Enum to String

1 reply [Last post]
rogerkock
Offline
Joined: 2006-07-17
Points: 0

Hello!

Somebody knows how can I convert an Enum variable to an String variable?

Thanks in advance!
Roger.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
morieris
Offline
Joined: 2006-11-30
Points: 0

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html says you can use name() or toString()