Groovy String Interpolation

Groovy is a scripting language for the Java platform. Groovy provides many powerful features such as closures, type inference, runtime and compile time meta-programming and many more. In this article, we are going to have a look at String interpolation.

First of all, for those who are wondering what “interpolation” is, interpolation is the process of replacing placeholders in String literals (excluding single and triple single quoted strings) with its value.

Before jumping into interpolation feature, let’s have a quick look at mutable String objects in Groovy.



Do you want to get articles like these in your inbox?

Email *

Interested groups *
Technical articles