In this tutorial, we will discuss about sorting a list by specific field/property. Often, we need to sort a list with its specific field. This is very easy and short code in java 8. Let's go for details...
Example:
1: package com.javabd1.blogspot.controller;
2: import java.util.ArrayList;
3: import java.util.HashMap;
4: import java.util.List;
5: import java.util.Map;
6: import org.springframework.beans.factory.annotation.Autowired;
7: import org.springframework.stereotype.Controller;
8: import org.springframework.validation.BindingResult;
9: import org.springframework.web.bind.annotation.ModelAttribute;
10: import org.springframework.web.bind.annotation.RequestMapping;
11: import org.springframework.web.bind.annotation.RequestMethod;...
Methods of Java Class Part-1

In the previous tutorial, discussed five elements of a java class. Method is one of them. Today we will learn about method of java class. As directly writing business logic are not allowed in java class. So we have to write business logic in a method. Method is used to write the logic of the program. Let's go for details of the method.
1. Method Signature : A method signature is the method name and the number and type of its parameters.
Example:- methodName(parameters);
calculate(int...