Same no in array and last index value is not giving proper output, check the code

package Arrays1D;

public class SelectionSort {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	
	int[] arr= {52,25,65, 35, 48,98, 54};
	selectionsort(arr);
	display(arr);

}

public static void selectionsort(int[] arr) {
	for(int counter=0;counter<arr.length-1;counter++) {
		
		int min=counter;
		for(int j=counter;j<arr.length-1;j++) {
			if(arr[j]<arr[min])
				min=j;
		}
		int temp=arr[min];
		arr[min]=arr[counter];
		arr[counter]=temp;
	}
}
public static void display(int[] arr) {
	for(int i=0;i<arr.length;i++) {
		System.out.println(arr[i]);
	}
}

}

set j = counter+1 not j=counter