Article
A stream represents a sequence of elements and supports different kinds of operations that lead to the desired result. The source of a stream is usually a Collection or an Array, from which data is streamed from. Streams differ from collections in several ways; most notably in that the streams...
Branko Ilic
Sorting is one of the fundamental techniques used in solving problems, especially in those related to writing and implementing efficient algorithms. Usually, sorting is paired with searching - meaning we first sort elements in the given collection, then search for something within it, as it is generally easier to search...
Java is a type-safe, verbose language. There are advantages to this, but also some drawbacks. Namely - there's oftentimes a lot of boilerplate code and simple operations such as printing an array aren't as simple as supplying it to the println() method: int[] array = new int[]{1, 2, 3, 4,...
David Landup
Graphs are a convenient way to store certain types of data. The concept was ported from mathematics and appropriated for the needs of computer science. Due to the fact that many things can be represented as graphs, graph traversal has become a common task, especially used in data science and...
The reduce() method is Java 8's answer to the need for a fold implementation in the Stream API. Folding is a very useful and common functional programming feature. It operates on a collection of elements to return a single result using some sort of operation. Note: Folding is also known...
Hiram Kamau
Regular Expressions (RegEx) are a powerful tool and help us match patterns in a flexible, dynamic and efficient way, as well as to perform operations based on the results. In this short guide, we'll take a look at how to validate email addresses in Java with Regular Expressions. If you'd...
Regular Expressions (RegEx) are a powerful tool and help us match patterns in a flexible, dynamic and efficient way, as well as to perform operations based on the results. In this short guide, we'll take a look at the built-in RegEx methods, which are a part of the String class...
© 2013-2025 Stack Abuse. All rights reserved.