Explore Java’s PriorityQueue iterator() method’s functionality and its effective use in various scenarios.
Search Results for: range
Converting Integer to BigDecimal in Java
Explore several methods to convert from Integer to BigDecimal in Java.
Converting BigDecimal to Integer in Java
Learn how to convert Integer to BigDecimal in Java.
Check if a Point Is Between Two Points Drawn on a Straight Line in Java
Explore ways to determine whether a point lies between two other points on a straight line.
Read Multiple Messages with Apache Kafka
Explore how the Kafka Consumer retrieves messages from the broker.
Find Missing Number From a Given Array in Java
Learn multiple approaches to finding a single missing number from an array in the integer range [1-N].
Sending Data to a Specific Partition in Kafka
Learn different techniques for sending data to specific partitions in Kafka.
Java’s String.length() and String.getBytes().length
Learn how character encoding works and explore why String.length() and String.getBytes().length can produce different results.
Convert String to long or Long in Java
In this tutorial, we learn how to convert a String to a long primitive or Long object.
Difference Between 1L and (long) 1
Learn the differences between defining a long value using literal representation and casting an int value to a long.
Compress and Uncompress Byte Array Using Deflater/Inflater
A quick and practical guide to compressing/uncompressing a byte array using the Deflater/Inflater classes.
@Query Definitions With SpEL Support in Spring Data JPA
Learn how to use Spring Expression Language to make custom queries more dynamic and hide database-specific actions in the repository layers.
Rotating a Java String By n Characters
Explore two different approaches to rotating a string by n characters.
Comparing One String With Multiple Values in One Expression in Java
Discover various ways of finding a string among a group of strings using a single expression.
Format LocalDate to ISO 8601 With T and Z
Explore various techniques for formatting a LocalDate to the ISO 8601 format. This format includes the ‘T’ separator and the ‘Z’ indicating UTC time.
Detect the Last Iteration in for Loops in Java
Explore different ways to determine if the current iteration is the last one when we loop over a Java List.
Recursively Sum the Integers in an Array
Explore two approaches to recursively summing integers in an array and analyze their performance using the JMH tool.
A Guide to Timefold Solver for Employee Scheduling
Learn how to use Timefold Solver, a planning optimization tool, to determine an optimal employee shift schedule.
Get Index of First Element Matching Boolean Using Java Streams
Learn how to use the Java Stream API and third-party libraries to find the index of the first element in a List that matches a boolean condition.
Inter-Process Communication Methods in Java
A quick and practical guide to inter-process communication in Java.