SHARE
TWEET

Untitled

a guest Jun 25th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def list = ['Groovy', 'Grails', 'Java']
  2. println(list.count { it.startsWith('G') } == 2)
  3.  
  4. Integer[] numbers = [1,2,3,4] as Integer[]
  5. println(numbers.count { it > 2 } == 2)
  6.  
  7. def map = [user: 'dariogabriel113', city: 'Fortaleza', age: 23]
  8. println(map.count { key, value -> key.size() == 3 } == 1)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top