Zipping Collections in Java

2021 VietMX 0

1. Introduction In this tutorial, we’ll illustrate how to zip two collections into one logical collection. The “zip” operation is slightly different from the standard “concat” […]

Sorting in Java

2021 VietMX 0

1. Overview This article will illustrate how to apply sorting to Array, List, Set and Map in Java 7 and Java 8. 2. Sorting With Array Let’s start by sorting integer arrays […]

Arrays.asList vs new ArrayList(Arrays.asList())

2021 VietMX 0

1. Overview In this short tutorial, we’ll take a look at the differences between Arrays.asList(array) and ArrayList(Arrays.asList(array)). 2. Arrays.asList Let’s start with the Arrays.asList method. Using this method, we can convert […]