❗ Assignment Java 8 Interview questions❗
1. Given a list of integers, find out all the even numbers that exist in the list
using Stream functions?
2. Given a list of integers, find out all the numbers starting with 1 using Stream
functions?
3. How to find duplicate elements in a given integers list in java using Stream
functions?
4. Given the list of integers, find the first element of the list using Stream
functions?
5. Given a list of integers, find the total number of elements present in the list
using Stream functions?
6. Given a list of integers, find the maximum value element present in it using
Stream functions?
7. Given a String, find the first non-repeated character in it using Stream
functions?
8. Given a String, find the first repeated character in it using Stream functions?
9. Given a String, find the second repeated character in it using Stream functions?
10. Given a list of integers, sort all the values present in it using Stream
functions?
11. Given a list of integers, sort all the values present in it in descending order
using Stream functions?
12. Given an integer array nums, return true if any value appears at least twice in
the array, and return false if every element is distinct.
13. How will you get the current date and time using Java 8 Date and Time API?
14. How will you get the current date and time using Java 8 Date and Time API?
15. Java 8 program to perform cube on list elements and filter numbers greater than
50.
16. Write a Java 8 program to sort an array and then convert the sorted array into
Stream?
17. How to use map to convert object into Uppercase in Java 8?
18. How to convert a List of objects into a Map by considering duplicated keys and
store them in sorted order?
19. How to count each element/word from the String ArrayList in Java8?
20. How to find only duplicate elements with its count from the String ArrayList in
Java8?
21. How to check if list is empty in Java 8 using Optional, if not null iterate
through the list and print the object?
22. Write a Program to find the Maximum element in an array?
23. Write a program to print the count of each character in a String?
24. Write a Java 8 program using a lambda expression to add two integers.
25. Write a Java 8 program to filter and print even numbers from a list.
26. Write a Java 8 program to map integers to their squares and print results.
27. Write a Java 8 program to print the lengths of strings in a list.
28 Write a Java 8 program to print distinct elements from a list of integers.
29. Write a Java 8 program to print names sorted in alphabetical order from a list.
30. Write a Java 8 program using Optional to check if a value is present.
31. Write a Java 8 program to create a custom functional interface for addition.
32. Write a Java 8 program to check if any number in a list is even using
anyMatch() method