I was playing around with some Groovy scripts and looking at some neat tip and tricks on how Groovy can simplify what would have taken a lot more code in Java. Here is one that came up with: print out the IP address in dot notation of a given host.
def hostname = 'google.com' println InetAddress.getByName(hostname).address.collect { it & 0xFF }.join('.')
Thanks..this was helpful!