In addition to Selenium, it’s equally important for QA professionals to strengthen their Java skills. One area that interviewers frequently focus on is Java Streams API – especially for data manipulation, filtering, and collection handling.
Here’s a practice list of Stream-based assignments to build confidence before interviews:
🔹 Practice Programs with Streams
- ✅ Find even & odd numbers from a list
- ✅ Find duplicate elements in an array/list
- ✅ Find the first non-repeated character in a string
- ✅ Count word frequency in a sentence
- ✅ Sort a list of employees by salary (ascending/descending)
- ✅ Find the maximum & minimum number in a list
- ✅ Remove duplicates from a list
- ✅ Convert a list of strings to uppercase & lowercase
- ✅ Find the sum & average of numbers in a list ✅
- Group employees by department using Collectors.groupingBy()
Once you have done this more to below list
- Print numbers from 1 to 100 using IntStream.rangeClosed()
- Filter even/odd numbers from a list
- Find numbers starting with “1” from a list (e.g., 10, 11, 12)
- Count elements in a list greater than a given value
- Convert a list of strings to uppercase/lowercase
- Remove null/empty strings from a list
- Find duplicates in a list of integers
- Find first non-repeated character in a string
- Find first repeated character in a string
- Count frequency of each character in a string
- Count frequency of each word in a sentence
- Find max & min numbers in a list
- Find sum & average of numbers in a list
- Sort a list of numbers in ascending/descending order
- Sort a list of strings alphabetically
- Join a list of strings with a delimiter (comma/space)
- Find the second highest number in a list
- Find the nth highest salary from a list of employees
- Sort employees by name, then by salary
- Group employees by department using Collectors.groupingBy()
- Partition employees into two groups (salary > 50k and <= 50k)
- Find the oldest and youngest employee from a list
- Convert a list of employees to a map (id → name)
- Flatten a list of lists into a single list using flatMap()
- Check if two lists are equal irrespective of order
- Merge two unsorted lists and remove duplicates
- Find common elements between two lists
- Find duplicate characters in a string with counts
- Reverse a string using streams
- Check if a string is a palindrome using streams
- Anagram check between two strings using streams
- Parallel stream example – count prime numbers between 1 and 1,000,000
- Performance comparison between normal stream vs parallel stream
- Find employees with the highest salary in each department (group + maxBy)
- Find top 3 salaries from a list of employees
- Convert Map<String, List<String>> → flat list of values
- Custom collector example (e.g., collect emails into a semicolon-separated string)
- Concise & readable code
- Widely asked in QA Automation interviews
- Helps in solving real-time test data handling problems efficiently