I can't able to understand that how i sort employee if salary is samme pls help me!

class Employee {
String name;
int salary;

Employee(String name, int salary) {
	this.name = name;
	this.salary = salary;
}

public String toString() {
	return name + " " + salary;
}

}

public class App03_SortGame {

public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	System.out.println("Enter no of employee");
	ArrayList<Employee> l = new ArrayList<Employee>();
	int nemp = sc.nextInt();

	while (nemp != 0) {
		// System.out.println("Enter name for employee " + nemp);
		String name = sc.next();
		// System.out.println("Enter salary for employee " + nemp);
		int salary = sc.nextInt();
		l.add(new Employee(name, salary));
		nemp--;
	}

	System.out.println();
	Collections.sort(l, (e1, e2) -> (e1.salary > e2.salary) ? -1 : (e1.salary < e2.salary) ? 1 : 0);


	for (int i = 0; i < l.size()-1; i++) {

		if (l.get(i).name.compareTo(l.get(i+1).name)>0) {
               String temp = l.get(i).name;
               l.get(i).name = l.get(i+1).name;
               l.get(i+1).name=temp;
		}

	}
	for (Employee employee : l) {
		if(employee.salary>79) {
			System.out.println(employee);
		}
	}

}

}

pls resolve my doubt

I’m waiting for your reply pls resolve my soubt

I’m waiting for your reply pls resolve my doubt

pls reply i’m waiting for you

@nigamshubham1998