Java 21 : Record Patterns, Pattern Matching and Virtual Threads

Java 21 release brings along with it new features which are very much programmer friendly and helps developer to reduce the amount of code to achieve same functionality. In this article, we will go through three of these features – Record Patterns, Pattern Matching for switch and Virtual Threads. Record Patterns This feature helps in

Java 21 : Record Patterns, Pattern Matching and Virtual Threads Read More »

Spring Security: Custom Authentication

Spring security is a powerful authentication and access control framework. It helps in implementing authentication and authorization features in spring applications. In this article, we work on implementing custom authentication using Spring Security in a Spring Boot application. The theory below is complemented with the YouTube video where actual code is demonstrated. Use Case: In

Spring Security: Custom Authentication Read More »

Java Reflection: Arrays

Reflection API provides us various methods to play around with array objects also. Refer below code demonstrating different array reflection methods. newInstance() method in Array.java class helps us to create an array using reflection.isArray() method on Class.java object represent whether the object is an array or not.getComponentType() method on Class.java helps to identify the type

Java Reflection: Arrays Read More »