Java Code Geeks

Java 2 Java Developers Resource Center

Latest articles

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...

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 ...

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...

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...

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...

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...

Spring Web MVC

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...

[MEGA DEAL] The Premium 2021 Microsoft Excel & Data Certification Bundle (97% off)

Kickstart Your Career as a Data Analyst with 90 Hours of Basic to Advanced Content on Microsoft Excel, Power BI, Tableau, VBA, Python & More! Hey fellow geeks, This week, on our JCG Deals store, we have another extreme offer.We are offering a massive 97% off on TThe Premium 2021 Microsoft Excel...

[MEGA DEAL] The Machine Learning for Beginners Overview Bundle (96% off)

Perfect for Aspiring Product Managers & Engineers, This Course Bundle Provides 7 Hours of Content on the Game-Changing AI and Machine Learning Tech Hey fellow geeks, This week, on our JCG Deals store, we have another extreme offer.We are offering a massive 96% off on The Machine Learning for...

Strong Typing without Types

In 1974, Liskov and Zilles defined a strongly-typed language as one in which “whenever an object is passed from a calling function to a called function, its type must be compatible with the type declared in the called function.” Strong type checking, without doubt, decreases the amount of type...

Discover, share and read the best on the web

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!