Groovy Operator Overloading - Safe navigation operator

//Safe navigation operator: used to avoid a NullPointerException.
def user = User.get(1)
def username = user?.username
​

Comments

Popular posts from this blog

Array and Object Creation - JavaScript

Groovy Tuples

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