Lambda Expressions and Method References

Hello, friends this my first article on Java 8.

Today, I am going to share how lambda expressions and method references reduce boilerplate code and make our code more readable and compact. Suppose we have a Student class that has two fields, name and age. We are going to sort a student list with the help of the Comparator interface. After that, we will reduce the code step-by-step with the help of some of Java 8's new features.