Learn how to find the index of the smallest element in an array.
Search Results for: range
Convert From int to short in Java
Learn how to convert from an int primitive to a short primitive in Java.
Resolving Security Exception: java.security.UnrecoverableKeyException: Cannot Recover Key
Learn everything you need to know about java.security.UnrecoverableKeyException – what causes it and how to fix it.
Unit Test for hashCode() in Java
Explore the importance of unit testing for the hashCode() method in Java.
Finding the nth Last Occurrence of char in String
Explore different methods to find the nth last occurrence of a character within a string using Java.
Converting Image to BufferedImage in Java
A quick and practical guide to converting images to BufferedImage in Java.
Calculating Moving Averages in Java
Let’s explore various methods and techniques for calculating moving averages, ranging from traditional approaches to libraries and Stream API’s.
Compress and Create a Byte Array Using GZip
Learn how to get the compressed data in a byte array when using the GZIP file format.
Download File from S3 Given a URL
Learn how to download a file from S3 given a URL with Java and AWS SDK.
Pass a Class as a Parameter in Java
Explore scenarios where we may need to pass a class as a parameter, enabling dynamic behavior and flexibility in our code.
New Features in Java 21
Learn about the new features of Java 21, like record patterns and switch enhancements for cleaner code.
How to Test Spring Application Events
Learn how to test code that uses Spring application events.
How to Check Number Perfection
This article explores perfect numbers and three methods to identify them: brute force, stream-based, and Euclid-Euler theorem.
Logging in Spring Boot With Loki
Learn how to send Spring Boot application logs to a Grafana Loki server.
Flatten a Stream of Maps to a Single Map in Java
Learn to combine a stream of maps into a single result map in Java.
Invalid Characters in XML
In this article, we learn about various invalid characters and how to handle them in XML processing.
Check if a Given Time Lies Between Two Times Regardless of Date
Explore ways to determine if a particular time lies within the two times without considering dates.
Checking if a Date Object Equals Yesterday
Explore various approaches for determining whether a given date object falls on yesterday.
Querydsl vs. JPA Criteria
Discover the differences and similarities between JPA Criteria and Querydsl.
Calculate Percentiles in Java
Learn how to calculate statistical percentiles of a collection or an array in Java.