Home / Java Techs / Groovy

Groovy

Groovy is an object-oriented programming language for the Java platform.

How to create a temporary file to store data

Create temporary files

Your application has to write data out in a temporary file to reprocess them before rendering to users. The file will be created temporarily and swept our when the application restarts or shuts down. How do we create such a ...

Read More »

Fastest way to get the first n elements of a List or an Array

Fastest way to get the first n elements of a List or an Array

Which is the fastest way to get the first n elements of a List or an Array? Let’s give a context where we want to extract some first elements from an array or a list. You have a list of ...

Read More »

An annoyed error needed to be paid more attention when using RestBuilder grails plugin

In the previous post about consuming web services in Grails using RestBuilder grails plugin, I explained how to set up a call to the remote service provider. However, I have recently encountered an annoying error as reported on its GitHub ...

Read More »

The Groovy Spaceship Operator Explained

Have you ever heard of the spaceship operator? If it is the case, how does it look like? To be honest, I have known it recently when I used this comparison operator to sort an array list of objects. In ...

Read More »

ArrayList in Java

ArrayList class implements List interface and it is based on Array data structure. It is widely used because of the functionality and flexibility that it offers. Most of the developers choose ArrayList instead of Array as it is considered as ...

Read More »

Using System properties in Grails

Retrieving a few of system variables is inevitable in developing computer applications within any environment. In this post, we would show you system variables existing once the application is loaded and how to retrieve a specific variable to pass it ...

Read More »

Combine two lists in Groovy

Combination or concatenation of two or multiple lists are believed to appear quite frequently in programming. This article aims to show you how to union two lists in Groovy in different ways. Combine lists with addAll The java.util.ArrayList.addAll(Collection<? extends E> c)  ...

Read More »

Unveil magic of hibernate lazy loading

SQL logging in hibernate

Recently we have discussed about the performance of retrieving collections/relations/associations inside objects. By the way, we also review the machinery that hibernate handles these relational concepts to improve the effectiveness of database operations. One of the techniques being implemented in ...

Read More »