Ошибка исключения нулевого указателя массива

Я продолжаю свой проект для школы и, похоже, столкнулся с еще одной ошибкой. Так что в основном я получаю исключение нулевого указателя, хотя код выглядит нормально. Я считаю, что что-то не так с моим массивом, и даже после нескольких часов поиска я могуКажется, я не нашел ошибку. Еще раз, любая помощь / решение будет принята с благодарностью.}

import java.util.*;

public class library {

private static students stu1 = new students(65435, "Bob", "Ted");
private static students stu2 = new students(45546, "Guy", "Sid");
private static students stu3 = new students(78688, "Tim", "Cas");
private static students stu4 = new students(45387, "Guy", "Jim");
private static students stu5 = new students(12367, "Dom", "Lam");
private static students stu6 = new students(45905, "Kid", "Loo");
private static students stu7 = new students(65484, "Mut", "Hum");
private static students stu8 = new students(34578, "Kim", "Hay");
private static students stu9 = new students(20457, "Roy", "Boy");
private static students stu0 = new students(15678, "Kil", "Bil");

private static students[] studentArray;
private static students[] stuArrayAlt;
private static boolean firstArrayStu = true;

// private static books bookName = new books("title",
// "author","category","isbn", cost, rating out of 10);

private static books book1 = new books(
        "Harry Potter and the Deathly Hallows", "JK Rowling", "fantasy",
        "9780739360385", 30.00, 9.0);
private static books book2 = new books("Angels and Demons", "Dan Brown",
        "fiction", "9780828855495", 25.00, 8.5);
private static books book3 = new books("The Hunger Games",
        "Suzanne Collins", "science fiction", "9780439023481", 20.00, 8.0);
private static books book4 = new books("A Game of Thrones",
        "George R R Martin", "fantasy", "9780002245845", 54.50, 12.5);
private static books book5 = new books("title2", "author2", "category2",
        "isbn2", 54.50, 12.5);
private static books book6 = new books("title2", "author2", "category2",
        "isbn2", 54.50, 12.5);
private static books book7 = new books("title2", "author2", "category2",
        "isbn2", 54.50, 12.5);
private static books book8 = new books("title2", "author2", "category2",
        "isbn2", 54.50, 12.5);
private static books book9 = new books("title2", "author2", "category2",
        "isbn2", 54.50, 12.5);
private static books book0 = new books("title2", "author2", "category2",
        "isbn2", 54.50, 12.5);

private static books[] bookArray;
private static books[] bookArrayAlt;
private static boolean firstArrayBook;

private static int year1;
private static int month1;
private static int date1;

public library() {
    bookArray = new books[] { book1, book2, book3, book4, book5, book6,
            book7, book8, book9, book0 };
    firstArrayBook = true;

    studentArray = new students[] { stu1, stu2, stu3, stu4, stu5, stu6,
            stu7, stu8, stu9, stu0 };
    firstArrayStu = true;
}

public static void main(String[] args) {
    // System.out.println(stu1.getStuNum() + " " + stu1.getFirstName() +
    // " "+ stu1.getLastName());

    // books[] bookReturn = stu1.insertBook(book1);
    // System.out.println(book1.getCheckInLibrary());
    // System.out.println(book1.getCheckInLibrary());

    // System.out.println(bookReturn[0].getName());

    // books[] bookReturn2 = stu1.insertBook(book2);
    // System.out.println(book2.getCheckInLibrary());
    // System.out.println(book2.getCheckInLibrary());
    // stu1.insertBook(book1);

    // checkOutBook(stu1,book1);
    // System.out.println(stu1);
    // stu1=null;
    // System.out.println(stu1);

    /*
     * stu1.lostBookFine(book1); System.out.println(stu1.getFineBalance());
     * stu1.lostBookFine(book2); System.out.println(stu1.getFineBalance());
     */

    int[] a = new int[] { 1, 2, 3, 4, 5 };
    int[] b = new int[(a.length) + 1];

    System.arraycopy(a, 0, b, 0, a.length);
    b[a.length] = 6;
    // for(int i=0;i

Ответы на вопрос(2)

Ваш ответ на вопрос