Tech

How to make a class Immutable in java

Making a class immutable means that its state cannot be changed once it’s created. In other words, all the fields of the class are set at the time of instantiation and cannot be modified afterward. This can be achieved by using the following techniques: Declaring all fields as final: This ensures that the fields cannot…

Tech

Why reflection in java is a problem?

Reflection in Java is a mechanism that allows a program to examine and manipulate the structure and behavior of objects at runtime. With reflection, a program can inspect and modify fields, methods, and constructors of a class, as well as access information about the class itself, such as its name, superclass, and interfaces. Reflection is…

Micronaut

Benefits of using Micronaut

Micronaut is a modern, JVM-based, full-stack microservices framework designed for building modular, easily testable microservice applications. It is developed by Graeme Rocher, who also know for his contribution to Grails framework. Micronaut tries to solve the drawbacks of java frameworks like spring and also provide built in support for existing development ecosystem, which includes support…

Tech

How to support multiple language in openhtmltopdf

Open HTML to PDF is a pure-Java library for rendering a reasonable subset of well-formed XML/XHTML (and even some HTML5) using CSS 2.1 (and later standards) for layout and formatting, outputting to PDF or images. https://github.com/danfickle/openhtmltopdf By default this library supports (serif, sans-serif, monospace). The fonts only support a basic Western European character set and…

Tech

Different ways to include dependencies in gradle

Gradle is a build automation tool that is widely used for building software projects, especially in the Java and Android ecosystems. It provides a flexible and powerful build system that allows developers to automate the build process of their projects, including compiling source code, managing dependencies, running tests, packaging and deploying the software. In Gradle,…

Pages