Core Java
-
Hamcrest Collection hasItem() Example
In Java, it’s common to check whether a collection contains a specific element. This is a frequent task in testing…
Read More » -
JPA Inheritance vs Composition Spring Boot Example
1. Introduction Inheritance is an “IS-A” type of relationship in object-oriented programming (OOP). Inheritance is tightly coupled since child classes…
Read More » -
Enhancing Java Objects with the Decorator Design Pattern
The Decorator design pattern is a structural pattern that provides a flexible way to add new behaviors to objects dynamically…
Read More » -
Java Array: Count Distinct Elements Frequencies
In programming, one common task is counting the number of times a specific element appears in an array. This is…
Read More » -
Maven Spotless Plugin for Java
Maintaining a consistent code style across a project is crucial for readability, collaboration, and long-term maintainability. The Maven Spotless Plugin…
Read More » -
Getting the Insert ID in JDBC
When working with relational databases in Java, it’s common to perform insert operations and then retrieve the ID of the…
Read More » -
Java Remove All Characters Before Specific One Character
When working with strings in Java, we may encounter scenarios where we need to remove all characters before a particular…
Read More » -
Using Apache POI to Extract Column Names From Excel
Apache POI is a powerful library that allows developers to work with Microsoft Office documents, including Excel files. Let us…
Read More » -
Unescape HTML Characters in Java
HTML entities are special characters reserved in HTML that need to be represented by a specific code. For instance, the…
Read More »