Learn several methods for accessing random elements from a HashMap in Java and their advantages and disadvantages.
Also find me here:
Baeldung Author
Eugene Kovko
I’m a self-taught technical writer and an interview engineer with a background in Java Development. My primary area of expertise is creating informative and engaging content, focusing on computer science and Java topics. With over four years of hands-on experience in the tech industry, I strive to infuse my writings with practical and insightful perspectives. As an interview engineer, I possess a unique understanding what tech companies are looking for in candidates is an insight that I bring to my articles.
Here's what I've written (so far):
Baeldung on Java
- All
- Java Numbers (6)
- Spring Data (5)
- Java (5)
- Core Java (5)
- Testing (4)
- Java List (4)
- Java Array (4)
- JVM (4)
- Spring (3)
- Java Collections (3)
- Java String (2)
- Java Map (2)
- Java Concurrency (2)
- Algorithms (2)
- XML (1)
- Spring Web (1)
- Spring Boot (1)
- REST (1)
- Maven (1)
- Java Streams (1)
- Jackson (1)
- JPA (1)
- IDE (1)
- DevOps (1)
- Data (1)
- Architecture (1)
Computing the Padovan Sequnce in Java
Filed under Algorithms
Learn how to calculate the Padovan sequence in many different ways.
Check if Two Integers Have the Same Sign
Filed under Java Numbers
Explore different ways to check if two integers have the same sign in Java.
Handling “non-value” doubles in Java
Filed under Java Numbers
Learn how handling incorrect values or “non-values” is a tricky art and heavily depends on what we plan to do with the numbers.
OpenAI API Client in Java
Filed under Java
Explore a practical example and build a simple console tool connected to ChatGPT.
Convert 2D Array Into 1D Array
Filed under Algorithms, Java Array
Learn how to convert a two-dimensional array into a one-dimensional, which is commonly known as flattening.
Finding the Index of the Smallest Element in an Array
Filed under Java Array
Learn how to find the index of the smallest element in an array.
Handling Nulls in ArrayList.addAll()
Filed under Java List
Learn how to handle nulls in ArrayList.addAll().
Converting Float ArrayList to Primitive Array in Java
Filed under Java Array, Java List
Learn how to convert an ArrayList of wrapper classes into an array of primitives.
Baeldung on Computer Science
- All
- Programming (5)
- Software Architecture (3)
- Research (3)
- Sorting (2)
- Concurrency (2)
- Path Finding (1)
- Networking (1)
- Core Concepts (1)
- Algorithms (1)
Lexicographic Ordering
Filed under Sorting
Learn about lexicographical ordering, its origin, and its importance in computer science.
418 Status Code “I’m a teapot”
Filed under Networking
Learn about the 418 “I’m a teapot” status for the first time.
How to Compare Two Algorithms Empirically?
Filed under Research
Learn how to empirically compare two algorithms, looking beyond computational complexity to understand their real-world performance.
Differences Between REST and RPC
Filed under Software Architecture
Explore the differences between REST and RPC, uncovering their histories, principles, advantages, and disadvantages.
How to Design Simulation Experiments?
Filed under Research
Learn how to design a simulation experiment.
The Printer-Spooler Problem
Filed under Concurrency
Explore the Printer-Spooler problem, which provides valuable insight into the challenges of concurrency control and the necessity of synchronization mechanisms in computer systems.
How to Narrow Down a Research Problem?
Filed under Research
Explore the significance of a good research question, emphasizing its role in refining the scope and aligning research objectives.
The Bounded-Buffer Problem
Filed under Concurrency
Explore the Bounded-Buffer Problem.
Federation in Computing
Filed under Software Architecture
Explore the concept of the federation in computing that enables organizations and systems to collaborate effectively while maintaining autonomy.
Baeldung on Kotlin
- All
- Kotlin Basics (1)
The Difference Between Int and Integer in Kotlin
Filed under Kotlin Basics
Explore the differences between Int and Integer in Kotlin.
Baeldung on Ops
- All
- Jenkins (1)
- Git (1)
The Problem With ‘src refspec does not match any’
Filed under Git
Learn how to deal with refspec errors and what is the reason behind them.
Scripted vs Declarative Pipelines in Jenkins
Filed under Jenkins
A quick and practical comparison between scripted and declarative pipelines in Jenkins.