1 min readMay 26, 2019
If you need functionality like that, just USE Groovy then…
Rather than type:
var list = new ArrayList<String>()
Type:
def list = [1,2,3,4,5]
or just initialize the range:
var list = [1...100]
And if you want this all to be statically typed, no problem:
ArrayList list = [1...100]
Java has a LOOOOOOONG way to go to catch up with it’s JVM brothers and sisters.