Java Programming Tutorials

Java programming tutorials with many code examples!

Remove duplicates from List in Java

We show how to remove duplicates from List in Java. Choose implementation depending on circumstances and with expected performance.

Read More

Share with the World!

Generate random numbers concurrently – ThreadLocalRandom

Until Java 7 there was no simple and effective way to generate random numbers concurrently. Here we show ThreadLocalRandom to generate random numbers in a thread-safe way.

Read More

Share with the World!

Java 8 range of numbers

How to generate in Java 8 range of numbers? This is practical problem, often met when writing tests. In this post we’ll cover fast implementation, comfortable, and flexible with Java 8 Streams!

Read More

Share with the World!

Java 8 List to Map

Very common task is creation of Map from a List of objects. In this post we show how to use Java 8 to convert List to Map using Collectors.

Read More

Share with the World!
Pages:1234567...19