Hi I need help with bubble sort ,Why doesnt work
Thanks

public void printList(){
		System.out.print(patientsList.get(0).getFirstName());
	      for(int i=0;i<patientsList.size();i++){
	       for(int j = 0; j < patientsList.size(); j++){
		for (int b=(j+1);b< patientsList.size(); b++){
	          int first=patientsList.get(j).getPriority();
	          int second=patientsList.get(b).getPriority();
		if(first>=second){
		int temp=first;
		first=second;
		second=temp;
		}
	 }
 }
	String fname = patientsList.get(i).getFirstName();
	String lname = patientsList.get(i).getLastName();
	int priority = patientsList.get(i).getPriority();
        System.out.println(fname + " "+lname+" "+priority);
			}