Task on Java Lambda and streams
Budget: ₹600 – ₹1,500 INR
Java Streams Exercise
Assume that an Electronics Shop currently has the following products in its stock for sale:
Task 1: Write a method to filter out all the mobile products and show their names and the
associated price.
Task 2: Write a method that sorts the price from low to high according to a given category and
shows the sorted products.
NOTE: Please use Java Streams for Filter and Sort.
Java Generics Exercise
Assume the above same Electronics Shop data and please complete the following tasks on
Generics:
Task 1: Write a Generic method that accepts an array list and sorts the items in ascending order
and returns back the sorted array list.
Task 2: Write a method that shows that sorted list.
Note: Do not use the Java Streams for Sorting.
Java Lambda Expression Exercise
Use the same above data of the Electronic Shop;
Task 1: Write a Lambda expression to get the total price of the entire stock available in the
shop.
Task 2: Write a Lambda expression to list out and show the products having a price of more
than 50 thousand.
Assume that an Electronics Shop currently has the following products in its stock for sale:
Task 1: Write a method to filter out all the mobile products and show their names and the
associated price.
Task 2: Write a method that sorts the price from low to high according to a given category and
shows the sorted products.
NOTE: Please use Java Streams for Filter and Sort.
Java Generics Exercise
Assume the above same Electronics Shop data and please complete the following tasks on
Generics:
Task 1: Write a Generic method that accepts an array list and sorts the items in ascending order
and returns back the sorted array list.
Task 2: Write a method that shows that sorted list.
Note: Do not use the Java Streams for Sorting.
Java Lambda Expression Exercise
Use the same above data of the Electronic Shop;
Task 1: Write a Lambda expression to get the total price of the entire stock available in the
shop.
Task 2: Write a Lambda expression to list out and show the products having a price of more
than 50 thousand.