Magic of Lambok in Java programming

Manpreet Singh
3 min readMar 21, 2022

Java has been one of the most popular programming languages for the past few decades and Java programmers have always been in huge demand. However, one of the major drawbacks of Java has been its verboseness.

As a developer, you must have dealt with boilerplate code that you need to add as a part of the source code such as constructors, getters, setters etc. and which made the code less readable and difficult to manage. We would expect Java to take care of such boilerplate by itself. Some of the new JVM based languages such as Kotlin does include that feature and that is also one of the reasons it is gaining popularity. However, in Java we are still bound to deal with these unnecessary lines of code, until now.

Lombok provides a java library that automatically plugs into your editor and build tools. So you never have to write another getter/setter, constructors or equals method again, and with a single annotation your class has a fully featured builder.

Lambok can be added to your project’s classpath as an external library and you can make use of it in your java classes using an array of annotations that it provides.

Intellij IDE

In order to use it in your Intellij IDE, simply install the plugin as shown below:

Once done, make sure that lambok is added to…

--

--

Manpreet Singh

Software developer who loves writing about programming, technology, passive income strategies etc.