Groovy web console

subscribe to the feed Subscribe
to this
site

Declare enumeration

Published 1 year ago by Valentin
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
enum Suit{
  SPADES,
  HEARTS,
  DIAMONDS,
  CLUBS
}

x = Suit.DIAMONDS
print x