0% found this document useful (0 votes)
47 views2 pages

Java Streams Important Questions

The document outlines a series of Java programming tasks and interview questions focused on the use of Java Streams API. It includes exercises on finding duplicates, sorting, calculating averages, and manipulating data structures, as well as questions on algorithms and REST API development. The content is aimed at enhancing coding skills and understanding of Java 8 features.

Uploaded by

nmoviesu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

Java Streams Important Questions

The document outlines a series of Java programming tasks and interview questions focused on the use of Java Streams API. It includes exercises on finding duplicates, sorting, calculating averages, and manipulating data structures, as well as questions on algorithms and REST API development. The content is aimed at enhancing coding skills and understanding of Java 8 features.

Uploaded by

nmoviesu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Streams & Coding Interview Questions

(Extended)

1. Write a Program to find the duplicates in an array using stream API.

2. How to sort the employee list in ascending and descending order using Java 8 streams API?

3. Find the highest salary of an employee from the HR department using Java stream API.

4. Find an average of even numbers using Java 8 stream API.

5. How to use sorting in Java-8?

6. Write a program using stream API to find the employee count in each department.

7. Find employees based on location or city and sort them alphabetically using stream API.

8. Find the occurrence of names of employees and the frequency of each name.

9. Write a program to print only numbers from an alphanumeric char array using stream API.

10. Write a program to find the sum of the entire array using Java 8 streams.

11. Write a program to find even numbers from a list and multiply them by 2 using streams.

12. Write a program to find the occurrence of each word in a given string.

13. Write a program to find common elements from three ArrayLists.

14. Write a program to convert a string to integer without using any API.

15. Write a program to find the first occurrence of a character in a string.

16. Write a program to find the missing number in an array.

17. Write a program to find all possible combinations of the string "GOD".

18. Write a program to check for valid parentheses.

19. Write a program to find duplicates in an ArrayList.

20. Write a program for the Quick Sort algorithm.

21. Write a program to check the minimum number of occurrences of a character in a string.

22. Write a program where each index stores the product of all array elements except itself.

23. Write a Spring Boot REST API for the addition of two integers.

24. How to count every character in a string using Java 8 streams?

25. Write a program to check if a string has all unique characters.

26. Write a program to find spikes in a stock price integer array.

27. Find the second highest salary of an employee using Java 8 streams.

28. Difference between map(), flatMap(), and filter() with example.


29. How to handle null values safely in Java 8 streams?

30. Write a program to partition numbers into even and odd using streams.

31. Find the longest string in a list using Java 8 streams.

32. Convert a List to Map using Java 8 streams (handle duplicate keys).

33. Write a program to find the top 3 highest paid employees.

34. Parallel Streams vs Streams – when and why to use them?

35. Write a program to remove duplicate elements while preserving order using streams.

You might also like