In this post, we will see how to traverse the given directory and list out all files present in it and all its sub-directories.
We have already covered how to flatten a Stream using flatMap() and concat() methods in Java 8. In this post, we will flatten a Stream in Java 8 using Stream.forEach() method.
In this post, we will discuss the difference between Stream.of() and Arrays.stream() method in Java.
In this post, we will discuss how to shuffle or randomize a List in Java using Fisher–Yates shuffle algorithm and shuffle() method provided by the Collections class.
Java 8 Streams can holds different types of data. For example, Stream<T>, Stream<T>, Stream<List<T>> – all these are valid streams in Java 8. We have seen in the previous post that flatMap() method can be used for flattening Streams in Java. In this post, we will flatten Stream of Arrays or Lists using Stream.concat() method …
In this post, we will discuss flatMap() method in Java which is used to flatten Streams in Java.
In this post, we will see how to reverse a List in Java by modifying the list in-place. That means that the conversion should take place without using any auxiliary list, by overwriting the existing elements of the specified list. Assume that the specified list is modifiable. For immutable lists, an UnsupportedOperationException should be …
In this post, we will talk about Collectors joining() method in Java.
In this post, we will discuss groupingBy() method provided by Collectors class in Java.
In this post, we will discuss partitioningBy() method included in Collectors class in Java 8.
In this post, we will discuss about Collectors minBy() and maxBy() methods in Java.
In this post, we will discuss about toList(), toSet() and toMap() methods of Collectors class in Java 8.