Author Archives
-
Java 16 – Pattern matching for instanceof
We all have used instanceof check with a subsequent cast to the desired type and in this process, we are doing two operations: validating whether the object we have is of the desired type using instanceof when the validation is… Read More ›
-
Using ROWNUM to paginate the data in Oracle
In one of my previous posts, I showed you how to use ROWNUM with ORDER BY clause. Building on that in this post I will show you how you can paginate your results using ROWNUM in Oracle DB and how… Read More ›
-
Java 16 – Records and Constructor
In my previous post, I introduced you to the new construct called Records which was introduced in Java 16. In this post, I will go a bit deeper into how you can override the default constructor of a record which… Read More ›
-
Java 16 – Records
We all, Java programmers, have complained whenever we were forced to create a class or use maps just to hold some data whilst other newer languages provided some out-of-the-box data structure for the same. Our problem has been addressed by… Read More ›
-
Java 15 – Text blocks
Text blocks are all about writing multi-line strings in a clean and readable way. This was added as part of JEP 378 in Java 15. One can read the detailed information of the feature from the JEP details. In this… Read More ›
-
Difference between Function.andThen and Function.compose
There are two different ways to mix functions in Java: using andThen using compose It is important to understand the difference between the two. andThen: function1.andThen(function2) will first apply function1 to the input and the result of this will be… Read More ›
-
Book Review: Do Epic Shit
“Do Epic Shit” is a self-help book by Ankur Warikoo which was released on December 2021. This is an amazing book. Very easy to read. The author has been honest and has shared his experiences so that anyone treading the… Read More ›
-
Different ways of declaration and initialization of arrays in Java
The below code shows the different ways one can declare and initialize an Array in Java: Line 5: Declaration of array along with initialization of its values. Here it is not required to pass the size of the array. Line… Read More ›
-
Testing the File Upload API in Spring Boot
In one of my previous post, I had created an API to upload file. In this post I will write a JUnit test to test the API. We will test the complete flow right from uploading till it is copied… Read More ›
-
Upload files in Spring Boot application using Commons FileUpload
In our previous post, we saw how to upload a file using the Spring framework’s default implementation for MultipartFile interface. In this post, we will see how we can use the Commons FileUpload library and the wrapper implementation CommonsMultipartFile provided… Read More ›