View difference between Paste ID: 6jtejiKL and 4zywUAgf
SHOW: | | - or go back to the newest paste.
1-
// Primitive integer is also an Object, so we can invoke methods
1+
def nullVariable = null
2-
println 'Loop 1'
2+
def emptyString = ''
3-
 3.times {
3+
def zero = 0
4-
     println it
4+
 
5-
 }
5+
 if(nullVariable) {
6
     println 'A null variable is not evaluate to null'
7
 }
8
 else {
9
     println 'A null variable is evaluate to null'
10
 }
11
 
12
 if(emptyString) {
13
     println 'An empty string is not evaluate to null'
14
 }
15
 else {
16
     println 'An empty string is evaluate to null'
17
 }
18
 
19
 if(zero) {
20
     println 'zero is not evaluate to null'
21
 }
22
 else {
23
     println 'zero is evaluate to null'
24
 }​