Groovy Goodness: Removing the Last Item From Lists [Snippet]

Versions of Groovy before 2.5.0 implemented different methods for the List class for the items at the end of a List object. The pop method removed the last item of a List and the push method added an item to the List. Groovy 2.5.0 reimplemented these methods so that they now work on the first item of a List instance. To remove an item from the end of the List   we can use the newly added method removeLast.

In the following sample Groovy code, we use the removeLast and add methods to...

What feeling does this article give you?
Joy
Disgust
Fear
Anger
Sadness

#hashtags to follow:

Versions of Groovy [+]    Groovy [+]   

More #news: