WHAT'S GROOVY Dynamic, compiled language for the Java Virtual Machine(JVM). Interoperable with existing Java libraries Concise, easy to read code Used by many major companies including:
THINGS TO REMEMBER! 1. There is more than one way to do almost anything. 2. It's probably optional. semi-colons typing parenthesis around parameters return statements 3. By default, the last command executed is what's returned.
TRY IT! Sum the numbers from 1 to 10 option1: int answer = 0 for (i in [1,2,3,4,5,6,7,8,9,10]) { answer += i } println answer option2: int answer = 0 (1..10).each { answer = answer + it } println answer Bonus answer: (1..10).sum()