A closure is an anonymous code block that can take arguments, return value, and also can be assigned to a variable. When it comes to Groovy, a closure can contain a variable scope defined outside of the closure expression. Groovy offers extended features to formal closure definition. By using this …

Regular Expression is a character sequence defines search pattern especially for pattern matching with strings. You may see Regular Expression as Regex or Regexp in software world. In this tutorial, I will show you how to use regex operations in Groovy by using pretty easy methods.

Date operations may be painful in most of the programming languages. You may spend most of your time to convert dates from one format to another one. In Groovy, date operations are very easy. Groovy has lots of functions extended from JDK Date API, this allows us to use date …

In previous tutorials, we have mentioned about Groovy List and provided lots of examples. In this tutorial, I will show you how to use Groovy arrays. Even if array and list seems to be same, they have differences in common. For example, arrays have fixed size while lists have dynamic …

In this tutoral, we will use Spring Boot for the web development environment, Websockets for real-time communication, Tomcat for the Java application container, Gradle for building and managing the dependencies, Thymeleaf for template rendering, MongoDB for data storage, and finally there will be no XML for bean configurations. Just to make you …

Sometimes, the provided text may not be suitable for our needs. Because of this, we use string manipulation functions to convert it to desired format or extract specific part of it. You can hear this operation as substringoperation in software development world. In this tutorial, I will show you how …