jaspal jaspal - 2 months ago 8x
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?


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