I'm trying to read this list of names and phone numbers in. But the the program keeps throwing nullpointerexception. Why is it doing this?
int i=0;
        Datab[] b = null;
         //b = null;
        // The name of the file to open.
        String fileName = "datt.dat";
        try {
            // Use this for reading the data.
            byte[] buffer = new byte[1000];
            FileInputStream FileIS = new FileInputStream("datt.dat");
            ObjectInputStream input = new ObjectInputStream(FileIS);
            for(i=0; i<b.length; i++)
             b[i]=(Datab)input.readObject();
            input.close();
 
    