title: Groovy - closures vs methods - the difference
body: <p><img src="https://i.stack.imgur.com/x5AUU.jpg" alt="enter image description here"></p>
  
  <p>If you look very carefully at the picture included, you will notice that you can refactor Groovy code using the Eclipse IDE and convert a method to a closure and vice versa. So, what exactly is a closure again and how is it different than a method? Can someone give a good example of using a closure as well as why it's a useful feature? Anonymous inner classes weren't good enough?</p>