0% found this document useful (0 votes)
126 views1 page

Collection Coding Questions

This document contains descriptions of several Java programs related to working with collections like lists, arrays, sets and maps. It includes programs for joining and converting between different collection types, iterating over collections, merging lists, updating maps, removing duplicates, calculating set operations, and sorting collections. It also provides examples of using stream functions to filter, find values, count, calculate maximum/minimum and sort collections of integers or characters.

Uploaded by

Lalit
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
126 views1 page

Collection Coding Questions

This document contains descriptions of several Java programs related to working with collections like lists, arrays, sets and maps. It includes programs for joining and converting between different collection types, iterating over collections, merging lists, updating maps, removing duplicates, calculating set operations, and sorting collections. It also provides examples of using stream functions to filter, find values, count, calculate maximum/minimum and sort collections of integers or characters.

Uploaded by

Lalit
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 1

 Java Program to Join Two Lists

 Java Program to Convert a List to Array and Vice Versa


 Java Program to Convert Map (HashMap) to List
 Java Program to Convert Array to Set (HashSet) and Vice-Versa
 Java Program to Sort a Map By Values

 Java Program to Get the middle element of LinkedList in a single iteration


 Java Program to Convert the LinkedList into an Array and vice versa
 Java Program to Convert the ArrayList into a string and vice versa
 Java Program to Iterate over an ArrayList
 Java Program to Iterate over a HashMap
 Java Program to Iterate over a Set
 Java Program to Merge two lists
 Java Program to Update value of HashMap using key
 Java Program to Remove duplicate elements from ArrayList
 Java Program to Get key from HashMap using the value

 Java Program to Calculate union of two sets


 Java Program to Calculate the intersection of two sets
 Java Program to Calculate the difference between two sets
 Java Program to Check if a set is the subset of another set
 Java Program to Sort map by keys
 Java Program to Iterate over ArrayList using Lambda Expression

 Given a list of integers, find out all the even numbers exist in the list using Stream functions?
 Given a list of integers, find out all the numbers starting with 1 using Stream functions?
 How to find duplicate elements in a given integers list in java using Stream functions?
 Given a list of integers, find the total number of elements present in the list using Stream
functions?
 Given a list of integers, find the maximum value element present in it using Stream functions?
 Given a String, find the first non-repeated character in it using Stream functions?
 Given a String, find the first repeated character in it using Stream functions?
 Given a list of integers, sort all the values present in it using Stream functions?
 Given a list of integers, sort all the values present in it in descending order using Stream
functions?

You might also like