Groovy web console

subscribe to the feed Subscribe
to this
site

null-empty-tests

Published 2 months ago by Rick
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def isNull = null
def isEmpty = ""

if (isNull) {
   print("is null")
}

if (isEmpty) {
   print ("is empty")
}

if (!isEmpty) {
   print ("is not empty")
}