Reputation: 37
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?
Upvotes: 2
Views: 2256
Reputation: 1467
You can call only getters and setters without parameters.
E.g.:
getValue() {
...
}
may be called as
instance.value
Upvotes: 0