In the below example class Student has three fields
Name, Age & Mark
Now i am showing 2 types of sorting here
- by Name
- by Mark
Comparator is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. This interface is a member of the Java Collections Framework.
No comments:
Post a Comment