Groovy web console

subscribe to the feed Subscribe
to this
Groovy object array example (via #groovywebconsole)
tweet this snippet Tweet

Groovy object array example

Published 9 months ago by wololock
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
class People {
    Integer id

class Job {
    def func() {
        People[] p = new People[10]
        assert p.size() == 10
        println p

new Job().func()