Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def nullVariable = null
- def emptyString = ''
- def zero = 0
- if(nullVariable) {
- println 'A null variable is not evaluate to null'
- }
- else {
- println 'A null variable is evaluate to null'
- }
- if(emptyString) {
- println 'An empty string is not evaluate to null'
- }
- else {
- println 'An empty string is evaluate to null'
- }
- if(zero) {
- println 'zero is not evaluate to null'
- }
- else {
- println 'zero is evaluate to null'
- }
Advertisement
Add Comment
Please, Sign In to add comment