Java usuń element w pozycji z tablicy i zmiany

static void deleteStudent() {
    System.out.println("Which student would you like to delete?"); //fixed spelling error
    for(int i=0;i<9;i++) {
      System.out.println(i + ": " + studentNamesArray[i]);
    }
    int studentChoice = input.nextInt();
    StudentName[] temp = new StudentName[studentNamesArray.length];//I don't know format
    for(int i = 0; i<studentNamesArray.length; i++) {
        if(i != studentChoice)
        {
            temp[j] = studentNamesArray[i]
         
        }
    }
    temp[studentNamesArray.length-1] = null;
    studentNamesArray = temp;
}
Smoggy Stoat