Using Current Time as Filename in Java
1. Introduction In this tutorial, we’ll look at several methods for obtaining the current timestamp value in Java and using it as a filename. To accomplish our goal, we’ll leverage several classes...
View ArticleEnable Java SSL Debug Logging
1. Overview Java Secure Socket Layer (SSL) debugging is crucial for developers and administrators to diagnose and troubleshoot issues related to establishing secure connections in applications....
View ArticleReset ListIterator to First Element of the List in Java
1. Overview When we work with Java, efficiently navigating through collections is a common requirement. When dealing with lists, the ListIterator interface provides a powerful tool for bidirectional...
View ArticleJFR View Command in Java 21
1. Introduction Java Flight Recorder (JFR) is a profiling and diagnostic tool that monitors the JVM and the programs that run on it. It’s a handy profiling tool developers use to monitor the state and...
View ArticleDifference Between mvn install and mvn verify
1. Introduction Apache Maven is a powerful build management tool that provides a structured way to manage the build lifecycle of a project. Maven builds are composed of lifecycles, which define clearly...
View ArticleHow to Catch Deserialization Errors in Spring-Kafka?
1. Overview In this article, we’ll learn about Spring-Kafka‘s RecordDeserializationException. After that, we’ll create a custom error handler to catch this exception and skip the invalid message,...
View ArticleApply Bold Text Style for an Entire Row Using Apache POI
1. Introduction In this quick tutorial, we’ll explore effective methods for applying a bold font style to entire rows in Excel sheets using the Apache POI library. Through straightforward examples and...
View ArticleCheck if Two Date Ranges Overlap
1. Introduction In various applications such as appointments, bookings, or project timelines, avoiding scheduling conflicts is paramount. Overlapping dates can lead to inconsistencies and errors. In...
View ArticleConvert byte[] to Byte[] and Vice Versa in Java
1. Overview While Byte is a wrapper of the primitive byte, and the conversion can be done automatically by autoboxing for individual values, it’s important to note that this automatic conversion...
View ArticleBuilder Pattern and Inheritance
1. Overview In this tutorial, we’ll learn about the challenges in implementing the Builder Design Pattern while dealing with hierarchal inheritance. An example of a hierarchical inheritance could be...
View ArticleCalculate Number of Weekdays Between Two Dates in Java
1. Overview In this tutorial, we’ll look at two different methods in Java for calculating the number of weekdays between two dates. We’ll look at a readable version using Streams and a less readable...
View ArticleRotate a Vertex Around a Certain Point in Java
1. Overview When working with computer graphics and game development, the ability to rotate vertices around a certain point is a fundamental skill. In this quick tutorial, we’ll explore different...
View ArticleList vs. Set in @OneToMany JPA
1. Overview Spring JPA and Hibernate provide a powerful tool for seamless database communication. However, as clients delegate more control to the frameworks, including query generation, the result...
View ArticleHow to Determine if a String Contains Invalid Encoded Characters
1. Introduction Invalidly еncodеd charactеrs can lеad to various issues, including data corruption and sеcurity vulnеrabilitiеs. Hence, ensuring that the data is properly еncodеd when working with...
View ArticleDifference between ZoneOffset.UTC and ZoneId.of(“UTC”)
1. Introduction Date and time information must be processed accurately in Java, and this involves managing time zones. ZoneOffset.UTC and ZoneId.of(“UTC”) are two standard methods that we can use for...
View ArticleCalculating the Power of Any Number in Java Without Using Math pow() Method
1. Introduction Calculating the powеr of a numbеr is a fundamental opеration in mathеmatics. And, while Java provides the convenient Math.pow() mеthod, there may be instances where we prеfеr...
View ArticleImproving Test Coverage and Readability With Spock’s Data Pipes and Tables
1. Introduction Spock is a great framework for writing tests, especially regarding increasing test coverage. In this tutorial, we’ll explore Spock’s data pipes and how to improve our line and branch...
View ArticleEvent Externalization with Spring Modulith
1. Overview In this article, we’ll discuss the need to publish messages within a @Transactional block and the associated performance challenges, such as prolonged database connection times. To tackle...
View ArticleHow to Find the URL of a Service in Kubernetes
1. Overview Networking is an integral part of Kubernetes, with Service being one of its primitive networking objects. Kubernetes Service allows us to expose a network application to the external world....
View ArticleIntroduction to gRPC with Spring Boot
1. Overview gRPC is a high-performance, open-source RPC framework initially developed by Google. It helps to eliminate boilerplate code and connect polyglot services in and across data centers. The API...
View Article