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
37.4K+ articles
Java
10.0K+ articles
Misc
8.5K+ articles
Java Programs
1.7K+ articles
Java - util package
1.6K+ articles
Java-Collections
1.1K+ articles
java-stream
142+ articles
Java-Array-Programs
117+ articles
java-list
95+ articles
Java-List-Programs
57+ articles
Java-Stream-programs
27 posts
Recent Articles
Popular Articles
How to get Slice of a Stream in Java
Last Updated: 11 December 2018
A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. Slice of a Stream means a stream of elements that exi...
read more
Java
Java Programs
Java-Collections
java-stream
Java-Stream-programs
Program to convert a Set to Stream in Java using Generics
Last Updated: 11 December 2018
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
java-stream
java-set
Java-Stream-programs
Java-Set-Programs
Program to Convert Stream to an Array in Java
Last Updated: 11 December 2018
A Stream is a sequence of objects that support various methods which can be pipelined to produce the desired result.An array is a group of like-typed variables that are re...
read more
Misc
Java
Java Programs
Java - util package
Java-Arrays
java-stream
Java-Stream-programs
Java-Array-Programs
Program to convert List of String to List of Integer in Java
Last Updated: 13 March 2024
The Java.util.List is a child interface of Collection. It is an ordered collection of objects in which duplicate values can be stored. Since List preserves the insertion o...
read more
Misc
Java
Java Programs
Java - util package
java-stream
java-list
Java-Stream-programs
Java-String-Programs
Java-List-Programs
Program to convert a Map to a Stream in Java
Last Updated: 11 December 2018
A Stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. Below are various method to convert Map to Stream in ...
read more
Misc
Java
Java Programs
Java - util package
java-stream
java-map
Java-Stream-programs
Program to convert Boxed Array to Stream in Java
Last Updated: 11 December 2018
An array is a group of like-typed variables that are referred to by a common name. An array can contain primitives data types as well as objects of a class depending on th...
read more
Misc
Java
Java Programs
Java - util package
Java-Arrays
java-stream
java-list
Java-Stream-programs
Java-Array-Programs
Program to convert Primitive Array to Stream in Java
Last Updated: 11 December 2018
An array is a group of like-typed variables that are referred to by a common name. An array can contain primitives data types as well as objects of a class depending on th...
read more
Misc
Java
Java Programs
Java - util package
Java-Arrays
java-stream
java-intstream
Java-Stream-programs
Java-Array-Programs
Program to convert List of Integer to List of String in Java
Last Updated: 11 December 2018
The Java.util.List is a child interface of Collection. It is an ordered collection of objects in which duplicate values can be stored. Since List preserves the insertion o...
read more
Misc
Java
Java Programs
Java - util package
java-stream
java-list
Java-Stream-programs
Java-String-Programs
Java-List-Programs
How to Get ArrayList from Stream in Java 8?
Last Updated: 17 July 2024
Given a Stream, the task is to convert this Stream into ArrayList in Java 8. Examples:Input: Stream: [1, 2, 3, 4, 5]Output: ArrayList: [1, 2, 3, 4, 5]Input: Stream: ['G',...
read more
Java
Java-ArrayList
java-stream
Java-Stream-programs
Java-List-Programs
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
10 Ways to Create a Stream in Java
Last Updated: 08 March 2024
The Stream API, introduced in Java 8, it is used to process collections of objects. Stream is a sequence of objects, that supports many different methods which can be pipe...
read more
Java
Technical Scripter
Picked
Technical Scripter 2018
java-stream
Java-Stream-programs
Count occurrence of a given character in a string using Stream API in Java
Last Updated: 29 May 2019
Given a string and a character, the task is to make a function which counts the occurrence of the given character in the string using Stream API.Examples: Input: str = "ge...
read more
Java
Java-Stream-programs
How to find duplicate elements in a Stream in Java
Last Updated: 10 January 2023
Given a stream containing some elements, the task is to find the duplicate elements in this stream in Java.Examples:Input: Stream = {5, 13, 4, 21, 13, 27, 2, 59, 59, 34}Ou...
read more
Java
Java Programs
java-stream
Java-Collectors
Java-Stream-programs
Java-Collections-Class
Find the last element of a Stream in Java
Last Updated: 30 July 2024
Given astreamcontaining some elements, the task is to get the last element of theStream in Java.Example:Input:Stream={“Geek_First”, “Geek_2”, “Geek_3”, “Geek_4”, “Geek_Las...
read more
Java
Java Programs
Java-Stream-programs
Find the first element of a Stream in Java
Last Updated: 04 April 2020
Given a stream containing some elements, the task is to get the first element of the Stream in Java. Example:Input: Stream = {"Geek_First", "Geek_2", "Geek_3", "Geek_4", "...
read more
Java
Java Programs
Java-Stream-programs
1
2
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 !