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.
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 discuss how to convert List of Characters to String in Java.
In this post, we will discuss how to convert a string to a list of characters in Java.
Since Java doesn’t offer any character Stream, we can create an IntStream (stream of ints) of characters when dealing with strings. In this post, we will discuss how to convert String to IntStream and IntStream to String in Java.
In this post, we will introduce IntSummaryStatistics class in Java which collect statistics such as count of elements, the minimum, maximum, sum, and average of elements in an IntStream.
In this post, we will discuss how to iterate over a Stream with indices in Java 8.
This post covers various methods to validate an IP address in Java.
In this post, we will see how to convert an Iterable to a Collection in Java.
In this post, we will see how to convert an Array to Iterable in Java.