jaspal jaspal - 1 year ago 86
Groovy Question

how to call Parameter-Less method in Groovy without braces

i can call method with parameter without braces
for def method(args){}

we can call it like

method " parameter"

but what if method does not have any parameter
void method()

how to call it without braces?

Answer Source

You can't, you need the braces like method() as you say