Java Programming Tips


GraalVM What is it?

Features of GraalVM GraalVM is a high performance JDK with a focus on 3 core features – high performance, compiled native app and polyglot programming. It is a drop-in replacement for Java 11 and Java 17. GraalVM community edition is an open source project with over 3.6 million lines of code contributed by the GraalVM […]

Java Byte Code Modification Using Cglib and Asm

This article looks at how cglib library can be used for java byte code manipulation at runtime. A number of popular java projects such as spring framework, guice and hibernate internally use cglib for byte code manipulation. Byte code modification enables manipulation or creation of new classes after compilation phase of java applications. In java, […]

How to Create a Fat Jar Using Maven

Maven is a popular build tool for Java projects. Using Maven it is possible specify all the third party dependencies of a project. During Java compilation, Maven adds these dependency library jars  automatically to the classpath. Maven can also be used to package a project as a distributable jar library. However when you package a […]

How to Generate all Permutations of a String in Java

The following Java program generates all the permutations of a string. It also eliminates any duplicate strings generated. This program can be used to generate anagrams. Note that the following program generates permutations in a case insensitive manner. Hence original case of the input string is not preserved in the permutations. The following program uses […]

How to Check if Two Words are Anagrams in Java

Permutations of a word are generated by shuffling the letters in the word. The full set consists of all permutations of the letters in a word. However only a subset of these are valid words in English language. These valid word combinations of letters is known as the Anagram for the original word and vice […]