1)-Use of Boolean expression
def x = false
return x
2)-Use of IF statement
def x= newValue
if (x <>
return true;
else
return false;
3)-Use of ArrayList
def myList=[10,20,30,40,50]
if(myList.get(2) == 30){
return false
}
else{
return true
}
4)-Use of HashMap
def myMap=[1:"A",2:"B", 3:"C"]http://groovy.codehaus.org/Tutorial+1+-+Getting+started
if(myMap[2] == null){
return false
}
else{
return true
}
No comments:
Post a Comment