working of compareTo() method of Comparable interface :            I have one Employee class and the requirement is to sort the objects using comparable interface. The output with this code is :
The difference of this id and other id is..** 6  other id**1
The difference of this id and other id is..** 3  other id**6
The difference of this id and other id is..** 3  other id**6
The difference of this id and other id is..** 3  other id**1
The difference of this id and other id is..** 11  other id**3
The difference of this id and other id is..** 11  other id**6
[Employee [name=lalit, id=1], Employee [name=zanjan, id=3], Employee [name=rmit, id=6], Employee [name=harjot, id=11]]


     public class Employee implements Comparable<Employee> {
            	private String name;
            	private Integer id;
            
            	@Override
            	public String toString() {
            		return "Employee [name=" + name + ", id=" + id + "]";
            	}
            
            	public Employee(Integer id, String name) {
            		this.name = name;
            		this.id = id;
            	}
            
            	public String getName() {
            		return name;
            	}
            
            	public Integer id() {
            		return id;
            	}
            
            	public void setName(String name) {
            		this.name = name;
            	}
            
            	public void setID(Integer id) {
            		this.id = id;
            	}
            
            	@Override
            	public int compareTo(Employee o) {
            		System.out.println("The difference of this id and other id is..** " + id + "  other id**" + o.id);
            		System.out.println(this.id);
            		System.out.println(o.id);
            		return this.id - o.id;
            	}
            }
        
        
        import java.util.List;
        import java.util.ArrayList;
        import java.util.Collections;
        public class ComparableDemo
        {
        	public static void main(String args[])
        	{
        		Employee e1 = new Employee(1, "lalit");
        		Employee e2 = new Employee(6, "rmit");
        		Employee e3 = new Employee(3, "zanjan");
        		Employee e4 = new Employee(11, "harjot");
        		List<Employee> empList = new ArrayList<Employee>();
        		empList.add(e1);
        		empList.add(e2);
        		empList.add(e3);
        		empList.add(e4);
        		Collections.sort(empList);
        		System.out.println(empList);
        	}
        }

My questions are :
1. How the first comparison would be between 6 & 1. 
2. How number 6 is assigned to this.id ? 
3. What is the need of comparing 3 & 6 two times? in the second and third line 
   of output. 
4. How actually compareTo method works, means how this subtraction leads to 
   sorting using Comparable. 
5. What are the values for this.id and how these values are assigned in this.id