logo       

returning void from a method: msg#00204

lang.groovy.user

Subject: returning void from a method

Quickie

if I have a method thats is typed void e.g.

void myMethod(test)

how can i return from it using the return statement

e.g.

void myMethod(test){
if(test == null) return
// otherwise do stuff
.... stuff
}

how do i do this withou generating an error ? is it possible ? is
there a special void object or something ?
--
regards
babelex

#OpenSource means free to innovate#



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise