Array-Sorting-Selection sort

what are errors in my code--------

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
int n = cin.nextInt(),arr[] = new int[n];
for(int i = 0;i<arr.length;i++){
arr[i] = cin.nextInt();
}
selectionSort(arr);
for(int ar:arr){
System.out.println(ar);
}
}
public static void selectionSort(int []arr){
for(int i = 0;i<arr.length-1;i++){
int min = i;
for(int j = i+1;j<arr.length;i++){
if(arr[min]>arr[j]){
min = j;
}
}
int temp = arr[i];
arr[i] = arr[min];
arr[min] = temp;
}
}
}

hi @AbhishekAhlawat1102,
Just a small error in the loop with index j you have done i++ rather than j++.
check comment in this corrected program.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

my code is exactly same but giving error in third case
i have tried for long as well . can anyone give my what to do pass that test?