Java Stream collect() operation with examples

Welcome to Java 8 series. In this tutorial, you will learn about java stream collect() operation with examples. Stream collect() is a reduction operation performed on the stream of elements. It applies a certain function on the stream of elements to generate the final output. Stream collect() is mainly used for, converting the stream of elements into a collection interface such as […]

Scala Stack operations explained

Welcome to Scala series. In this tutorial, you will learn about the Scala Stack and I have explained most of the Stack operations with examples. A stack is based on the Last-In-First-Out algorithm(LIFO) and it is one of the basic collections being used in any programming language. Scala does support Stack out of the box. Some of the real-world use cases […]

How to use Collectors averagingDouble()/averagingInt/averagingLong in Java 8

Welcome to Java 8 series. In this tutorial, you will learn about how to use Collectors averagingDouble()/averagingInt/averagingLong in Java 8 If you would like to learn about Java 8 Stream operations. Please check out this link. Collectors.averagingDouble()/averagingInt/averagingLong in Java 8 is mainly used to identify mean of the stream of elements. If there is scenario or use case to find the […]

How to use Collectors.summarizingDouble() in Java 8

Welcome to Java 8 series. In this tutorial, you will learn about how to use Collectors.summarizingDouble() in Java 8 If you would like to learn about Java 8 Stream operations. Please check out this link. Collectors.summarizingDouble() Collectors.summarizingDouble() in Java 8 is a useful and wonderful operation of Stream collect(). It provides us the statistics of the stream of elements. It returns […]

How to use Collectors.summarizingLong() in Java 8

Welcome to Java 8 series. In this tutorial, you will learn about how to use Collectors.summarizingLong() in Java 8 If you would like to learn about Java 8 Stream operations. Please check out this link. Collectors.summarizingLong() Collectors.summarizingLong() in Java 8 is a useful and wonderful operation of Stream collect(). It provides us the statistics of the stream of elements. It returns […]

How to use Collectors.summarizingInt() in Java 8

Welcome to Java 8 series. In this tutorial, you will learn about how to use Collectors.summarizingInt() in Java 8 If you would like to learn about Java 8 Stream operations.Please check out this link. Collectors.summarizingInt() Collectors.summarizingInt() in Java 8 is a useful and wonderful operation of Stream collect().It provides us the statistics of the stream of elements. It returns a class […]

Collectors.summingInt()/summingLong()/summingDouble()

Welcome to Java 8 series. In this tutorial, you will learn about how to use Collectors.summingInt()/summingLong()/summingDouble()  in Java 8. If you would like to learn about Java 8 Stream operations.Please check out this link. Collectors.summingInt()/summingLong()/summingDouble()  is used in Java 8 streams to sum the elements of the Stream into a single value. Each operation produces the sum value of the stream […]