Core Java
-
Java Performance 2 * i * i Multiplication : 2 * (i * i) Faster Than 2 * i * i
When optimizing code, even small differences in expression syntax can impact performance. One such example is the difference between 2…
Read More » -
Hibernate @TimeZoneStorage Example
1. Introduction Hibernate 6 introduces TimeZoneStorage annotation that specifies how the time zone information of a persistent property or field…
Read More » -
JaCoCo: Achieving Comprehensive Code Coverage in Java
Achieving high code quality and reliability is crucial for any Java project, and one key aspect of this is code…
Read More » -
Calling Getclass From a Static Context Example
1. Introduction In Java, the static keyword may be applied to an inner class (a class defined within another class),…
Read More » -
JVM Monitoring: Dynamic Attach and Serviceability Agent Overview
The Java Virtual Machine (JVM) includes built-in diagnostics and monitoring tools, like the Dynamic Attach API and the Serviceability Agent…
Read More » -
Checking if a Number is a Palindrome in Java
In coding challenges, checking if a number is a palindrome is a basic and common problem. A palindrome refers to…
Read More » -
Make Tests More Readable With Java Spock
Testing is a vital part of modern software development. As we scale our test cases, duplicating code across tests becomes…
Read More » -
How to Avoid Concurrent Modification Exceptions in Java Collections
Java collections are powerful tools for managing data, but they can introduce complexity, especially when dealing with concurrent modifications. One…
Read More » -
AssertJ Ignore Fields Comparison Example
1. Introduction AssertJ is a fluent assertion library for Java. It’s open-source and supported by the AssertJ team under Apache…
Read More »