This repository contains the code and resources for Sprint 1, which covers the following topics:
- Functional Interface
- Lambda Expression
- Inbuilt Functional Interfaces in Java
- Collections Framework Problems
Description: This project addresses a specific problem related to functional interfaces. It demonstrates how to implement and utilize them effectively. ๐ก
Solution:
- What is Functional Programming and Functional Interface โ
- Implementations of Functional Interfaces:
- Predicate โ๏ธ
- Consumer ๐จ๏ธ
- Supplier ๐๏ธ
- Function<String, Product>
โ๏ธ
Description: In this project, we dive into lambda expressions and explore their practical applications. It showcases various examples to illustrate their usage. ๐
Solution:
- Bean classes: Student and Employee ๐
- List of Student objects ๐
- Transformation of Students to Employees using Stream API and map function ๐
- Sorting Employees by salary in descending order using Lambda Expression ๐
- Printing both Employee's List and Original Student's List using Lambda Expression ๐จ๏ธ
Description: The Problem 3 project focuses on using stream API and lambda expressions to process a list of Student names. โจ
Solution:
- Create a List of 10 Student names using stream API ๐
- Filter and transform names with even length to uppercase โ
- Sort the transformed List in descending order using Lambda Expression ๐
- Print both original and transformed List using Lambda Expressions ๐จ๏ธ
Description: This project explains the features of the Stream API in Java and discusses some of the intermediate and terminal methods of the Stream object. ๐
Solution:
- Features of Stream API โจ
- Intermediate methods example โ๏ธ
- Terminal methods example ๐
Description: The Problem 5 project explains the concept of method reference and demonstrates how to refer to static methods, non-static methods, and constructors using method references. ๐
Solution:
- Explanation of Method Reference โ
- Static method reference example โก
- Non-static method reference example ๐โโ๏ธ
- Constructor reference example ๐ญ
Description: This project focuses on implementing a class named GroceryItems with customized sorting using the Comparator interface. ๐
Solution:
- GroceryItems class with price, name, and usedFrequency data members ๐ฆ
- Definition of Comparator to sort GroceryItems ๐
- Storing objects of GroceryItems in TreeSet with natural order and custom order defined by Comparator ๐
If you want to contact me, you can reach me through below handles.