Groovy Ternary Operator

//Groovy also supports the ternary operator:
def y = 10
def x = (y > 1) ? "worked" : "failed"
assert x == "worked"

Comments

Popular posts from this blog

அவன் ஏன் கூலியானான்?

தட்டு வண்டியில் காளிக்கோயில் - சிறுகதை

படையப்பாவும் ஹெர்குலசும்