JAVA DATE TIME API / NOTES</>↗Java Date Time API28 Aug 2023
Since JDK 8, we can create a datetime formatter / parser pattern that can have optional sections. When parsing a datetime string that contains optional values, for example, a date without time part or a datetime without second part, we can create a parsing pattern wrapped within the [] symbols. The [ character is the […]
APACHE POI / NOTES</>↗Apache POI15 Apr 2023
A friend of mine told me that he has a large Excel file, and he asked me if I could split the file into multiple smaller Excel files. So I write this little program using Apache POI to do it. The code snippet below basically contains the following steps: Load the Excel as an InputStream […]
CORE API / NOTES</>↗Core API29 Mar 2023
The Runtime.getRuntime().availableProcessors() method returns the maximum number of processors available to the Java virtual machine, the value will never be smaller than one. Knowing the number of available processor you can use it for example to limit the number of thread in your application when you are writing a multi-thread code. package org.kodejava.lang; public class […]
SPRING CORE / NOTES</>↗Spring Core29 Mar 2023
When you use the Spring framework @Transactional annotation in your service layer you might want to see what is happening in your code related to database transaction. You want to see when a transaction is started, when it is committed or rollbacked. To activate the log for transactional message you can add the following configurations […]
ZK FRAMEWORK / NOTES</>↗ZK Framework08 Mar 2023
In this example we are going to build a simple search page using ZK framework and Spring Boot. We are going to use the latest available version of Spring Boot (3.0.0) and ZK Framework (9.6.0.2). So without taking more time let’s start by creating a new spring boot project with the following pom.xml. You can […]
GENERAL / NOTES</>↗General18 Jan 2023
Pexels The programming world is changing, and opportunities await aspiring coders. With robust support from major technology giants and an ever-expanding job market, now is the time to start your career as a Java developer. Whether you’re a professional looking to break into the field or a beginner with no experience who wants to get […]