jaspal jaspal - 1 year ago 109
Groovy Question

how to call Parameter-Less method in Groovy without braces

i can call method with parameter without braces
example:-
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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download