groovy script convert string to integer code example Example 1: groovy to int int value = "66" as Integer Example 2: groovy to int int num = 66 as Integer