Skip to content

Tag Archives: Java-Stream-programs

Given an Iterable, the task is to convert it into Stream in Java. Examples: Input: Iterable = [1, 2, 3, 4, 5] Output: {1, 2,… Read More
Given an Iterator, the task is to convert it into Stream in Java. Examples: Input: Iterator = {1, 2, 3, 4, 5} Output: {1, 2,… Read More
Given a Instream containing ASCII values, the task is to convert this Instream into a String containing the characters corresponding to the ASCII values. Examples:… Read More
Given a Character Array, the task is to convert this array into an IntStream containing the ASCII values of the character elements. Examples: Input: char[]… Read More
Given a String, the task is to convert this String into an IntStream containing the ASCII values of the characters as the elements. Examples: Input:… Read More
Given an array of fixed length. The task is to remove an element at a specific index from the array. Examples: Input: arr[] = {… Read More
Arrays.stream() The stream(T[] array) method of Arrays class in Java, is used to get a Sequential Stream from the array passed as the parameter with… Read More
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… Read More
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… Read More
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… Read More
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… Read More
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… Read More
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… Read More
The List is a child interface of Collection. It is an ordered collection of objects in which duplicate values can be stored. Since List preserves… Read More
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… Read More