Learn how to efficiently retrieve a range of items from a stream in Java.
Search Results for: range
Check if Two Date Ranges Overlap
Explore different scenarios of date range overlap and dive into various approaches and formulas to check for overlaps
Understanding the Difference Between Stream.of() and IntStream.range()
Learn about Stream.of() and IntStream.range() and learn about certain operations that may turn a Stream from “lazy” to “eager”.
How to Check Whether an Integer Exists in a Range with Java
Learn how to check whether an integer exists within the bounds of a range.
Find Whether an IP Address Is in the Specified Range or Not in Java
Learn how to check if an IP address is in a given range in Java.
Range Search Algorithm in Java
Learn how to use a quadtree data structure in Java to perform a range search on data points in a two-dimensional space.
Generating Random Numbers in a Range in Java
Learn about alternative ways of generating random numbers within a range in Java.
Listing Numbers Within a Range in Java
Explore various ways of generating random numbers within a range in Java.
Spring Security – Whitelist IP Range
Learn how to whitelist an IP range in a Spring Security configuration.
Iterate Through a Range of Dates in Java
Learn some practical ways to iterate over a range of date values, whether you’re using Java 7, 8, or 9 and above.
Guide to Guava RangeMap
Learn how to use the Google Guava’s RangeMap interface and its implementations.
Guide to Guava RangeSet
Learn how to use the Google Guava RangeSet and its implementations through practical examples.
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.