Friday, July 20, 2012

groovy : <=>

This is the operator usually used in comparator. It will returns –1, 0, 1

println (1<=>2)  // –1
println (1<=>1) // 0
println (2<=>1) // 1

No comments:

Post a Comment