Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our YouTube channel to start Rocking right now!
Gain access to the industrys' best FREE video guides including:
1. Core Java guides
2. Enterprise Java guides
3. JVM insights, configuration and troubleshooting guides
4. Java performance guides
5. Java Interview Questions
and many more ....

Java Extension Methods

Whither Extension Methods? Apparently, there’s a java dialect called XTend which does this, but there’s no obvious equivalent of extension methods in Java. An extension method, as I recall from C#, allows you to define something like this: 01 02 03 04 05 06 07 08 09 10 11 int myExtensionMethod(SomeClass theExtendee, Object input) {    return ...; } SomeClass myExtendable ...

Read More »

Composition over Permutations

I’m in the process of reworking an open-source library to make it operate more easily for my use cases. The writer of the library has a particular view of how software should be, and it will not co-exist with the sort of design patterns I’d like to use. I’d like to think that this is a question of too many ...

Read More »

Not That Sort of Code

Following recent discussion online, I’d like to make what I consider to be an important statement about code. The purpose of code is to express the logic of the software both to the computer and to future developers. There are various design conventions which, if followed, speak as loudly as the code, so we often find ourselves working with commonly ...

Read More »

Overview of implementing Distributed Locks

As we know, locks are generally used to monitor and control access to shared resources by multiple threads at the same time. They basically protect data integrity and atomicity in concurrent applications i.e. Only one thread at a time can acquire a lock on shared resource which otherwise is not accessible. But a lock in distributed environment is more than ...

Read More »

JDK 16: Checking Indexes and Ranges of Longs

In my last post, I described the day period support added with JDK 16 Early Access Build 25. That same build also added methods for checking indexes and ranges of long values, which is the subject of this post. JDK-8255150 (“Add utility methods to check long indexes and ranges”) is the Enhancement used to add utility methods for checking long ...

Read More »

Static Factories are Great!

Every now and then I jump on classes with multiple constructors or classes that are rigorous to work with. Let alone not being able to mock part of their components and at the end being forced to use reflection for testing (mockito based, old school, you choose). Imagine a Producer class that you use for Kafka. A class that provides ...

Read More »

Spring Web MVC

spring-interview-questions-answers

Spring MVC is a web framework based on the model–view–controller pattern. It is based on the Spring principles and supports a wide range of server-side rendering technologies as JSP, Thymeleaf, Groovy, among others. Dispatcher Servlet It is a front controller that coordinates all the request handling activities. Delegates to the web infrastructure beans and invokes the user’s web components. It ...

Read More »