How to sort a Set in Java example

There are different versions of Java available with different ways to sort collections of objects. We will be showing examples of how to sort a set of objects or strings alphabetically in Java 8, Java 7 and older versions using comparator.

Too many functions in Java code

Many java developers follow the principles of clean code. But can it be too much? I have recently reviewed code that had almost a dozen of wrappers around its private members. When is code readable enough?

How to program a drone with Java

In this article we will answer one simple question about drone programming – where do I start? What do I need to do to make a simple drone application?

Java volatile vs atomic variables

Volatile and atomic variables are an important feature in Java language. Especially when dealing with multi threading. A simple incrementation algorithm works fine in a single threaded program, but won’t work as expected in a multi threaded system:

Java 8 parallel streams API

Parallel programming is a very difficult, but sometimes a necessary task. Modern computers contain multiple cores and any complex algorithm that is not performing parallel processing is not exploiting the full potential of the hardware.

How to use Java varargs

The three dots in a method parameter type is a feature called Java varargs. It was introduced in Java 5 and is formally known as variable arity methods or variadic functions.