Java Programming Tutorials

Java programming tutorials with many code examples!

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!

Java 8 forEach examples

In this article we present Java 8 forEach on examples. These are very convenient methods for use with Lambda Expressions and method references.

Read More

Share with the World!
Pages:123