Groovy web console

subscribe to the feed Subscribe
to this
site

generated getters/setters

Published 2 months ago by william
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
class Foo {
  int x
  String toString() { "Foo(x=${x})" }
}

Foo f = new Foo(x: 666)
println(f)
f.setX(667)
println(f)
println(f.getX())