Compare BitSets and boolean[] in terms of performance in different scenarios
Search Results for: bits
A Guide to BitSet in Java
Learn how we can use a Java BitSet to represent a vector of bits, gett familiar with the BitSet internals, and take a closer look at its API
Representation of Integers at a Bit Level in Java
Understanding how Java represents integers can help us with certain mathematical operations. In this article, we look at integer representation and how to use bitwise operations with Java numbers.
RGB Representation as an Integer in Java
Learn how to use bitwise operations to move between RGB and integer representations.
Blowfish Encryption Algorithm
Learn how to implement encryption and decryption using Blowfish ciphers with the Java Cryptography Architecture (JCA).
Count the Number of Unique Digits in an Integer using Java
A quick and practical guide to counting unique digits in an Integer using Java.
Testcontainers Desktop
Learn how to use the Testcontainers Desktop application, a simple yet powerful tool for running Testcontainers.
Storing UUID as Base64 String in Java
Learn how to store UUID as Base64 String using different approaches in Java.
Generating Unique Positive Long Using SecureRandom in Java
Learn how to use SecureRandom to generate unique positive values in Java.
Converting BigDecimal to Integer in Java
Learn how to convert Integer to BigDecimal in Java.
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].
UTF-8 Validation in Java
Explore UTF-8 encoded bytes and string conversion and different types of UTF-8 validation based on byte and stream.
Handling NullPointerException in findFirst() When the First Element Is Null
To avoid NullPointerException when using findFirst() in Java, filter the stream before calling findFirst() or use Optional#ofNullable() to wrap values in an Optional object.
Convert Positive Integer to Negative and Vice Versa in Java
Learn how to turn an integer in Java from negative to positive and vice versa.
Generating Unique Positive long Using UUID in Java
Learn how to use a UUID to generate a unique numeric value.
Limiting the Max Size of a HashMap in Java
In this tutorial, we learn how to limit the number of entries in a HashMap.
Time Complexity of Java Collections Sort in Java
Explore thе Collеctions.sort() timе complеxity using Java Microbеnchmark Harnеss (JMH).
Bill Pugh Singleton Implementation
Learn to implement the Bill Pugh Singleton pattern.
Converting from float to BigDecimal in Java
Learn how to convert from a Java IEEE 754 float to BigDecimal.
Java Double vs. BigDecimal
Compare Java’s Double to BigDecimal and learn about their differences.