Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.7K+ articles
Java
9.3K+ articles
Misc
7.8K+ articles
Java-Functions
4.2K+ articles
Java - util package
1.6K+ articles
Java Programs
1.6K+ articles
java-stream
142+ articles
Java 8
121+ articles
Java-Library
71+ articles
Java-Collectors
17+ articles
Java-Stream-Collectors
15 posts
Recent Articles
Popular Articles
Java 8 Streams | Collectors.joining() method with Examples
Last Updated: 17 January 2023
The joining() method of Collectors Class, in Java, is used to join various elements of a character or string array into a single string object. This method uses the stream...
read more
Java
Java-Library
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java 8 | Collectors averagingInt() with Examples
Last Updated: 06 December 2018
Collectors averagingInt(ToIntFunction? super T mapper) method is used to find the mean of the integers passed in the parameters. This method returns a Collector that produ...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java | Collectors averagingLong (ToLongFunction mapper) with Examples
Last Updated: 06 December 2018
Collectors averagingLong(ToLongFunction? super T mapper) method is used to find the mean of the long values passed in the parameters. This method returns a Collector that ...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java | Collectors averagingDouble() with Examples
Last Updated: 06 December 2018
Collectors averagingDouble(ToDoubleFunction? super T mapper) method is used to find the mean of the double values passed in the parameters. This method returns a Collector...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java 8 | Collectors counting() with Examples
Last Updated: 06 December 2018
Collectors counting() method is used to count the number of elements passed in the stream as the parameter. It returns a Collector accepting elements of type T that counts...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java | Collectors maxBy(Comparator comparator) with Examples
Last Updated: 06 December 2018
Collectors maxBy(Comparator? super T comparator) is used to find an element according to the comparator passed as the parameter. It returns a Collector that produces the m...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java | Collectors minBy(Comparator comparator) with Examples
Last Updated: 06 December 2018
Collectors minBy(Comparator? super T comparator) is used to find an element according to the comparator passed as the parameter. It returns a Collector that produces the m...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Collectors toSet() in Java with Examples
Last Updated: 06 December 2018
Collectors toSet() returns a Collector that accumulates the input elements into a new Set. There are no guarantees on the type, mutability, serializability, or thread-safe...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Java Stream | Collectors toCollection() in Java
Last Updated: 06 December 2018
Collectors toCollection(SupplierC collectionFactory) method in Java is used to create a Collection using Collector. It returns a Collector that accumulates the input eleme...
read more
Misc
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Collectors partitioningBy() method in Java
Last Updated: 06 December 2018
Collectors partitioningBy() method is a predefined method of java.util.stream.Collectors class which is used to partition a stream of objects(or a set of elements) based o...
read more
Java
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java 8
Java-Collectors
Collectors toList() method in Java with Examples
Last Updated: 25 July 2024
The toList() method of Collectors Class is a static (class) method. It returns a Collector Interface that gathers the input data onto a new list. This method never guarant...
read more
Java
Technical Scripter
Java-Collections
Java - util package
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Collectors toMap() method in Java with Examples
Last Updated: 06 December 2018
The toMap() method is a static method of Collectors class which returns a Collector that accumulates elements into a Map whose keys and values are the result of applying t...
read more
Java
Picked
Java - util package
java-basics
Java-Functions
java-stream
Java-Stream-Collectors
Java-Collectors
Reverse elements of a Parallel Stream in Java
Last Updated: 11 December 2018
Given a Parallel Stream in Java, the task is to reverse its elements. Examples:Input: Parallel Stream = {11, 22, 33, 44}Output: {44, 33, 22, 11}Input: Parallel Stream = {a...
read more
Java
Technical Scripter
Picked
Technical Scripter 2018
Java-Collections
Java - util package
Java-Stream-Collectors
Java-Stream-programs
Collectors collectingAndThen() method in Java with Examples
Last Updated: 16 June 2022
The collectingAndThen(Collector downstream, Function finisher) method of class collectors in Java, which adopts Collector so that we can perform an additional finishing tr...
read more
Java
Java - util package
Java-Functions
Java-Stream-Collectors
Java-Collectors
How to convert a Stream into a Map in Java
Last Updated: 21 June 2020
Introduced in Java 8, the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipelined to p...
read more
Java
Java Programs
java-stream
java-map
Java-Stream-Collectors
Java 8
Java-Collectors
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !