public static void ler_Pessoa() {
        boolean encontrado = false;

        // Wrap all in a try/catch block to trap I/O errors.
        try {
            // Open file to read from, named SavedObj.dat.
            FileInputStream saveFile = new FileInputStream("Pessoa.dat");

            // Create an ObjectInputStream to get objects from save file.
            ObjectInputStream save = new ObjectInputStream(saveFile);

            // Now we do the restore.
            // readObject() returns a generic Object, we cast those back
            // into their original class type.
            // For primitive types, use the corresponding reference class.
            list = (ArrayList<Pessoa>) save.readObject();
            long x = save.readLong();
            Pessoa.setId_aux_pessoa(x);

            // Close the file.
            save.close(); // This also closes saveFile.
        } catch (FileNotFoundException ex) {
            System.out.println("Ficheiro Pessoa.dat nao encontrado!");
            encontrado = false;
        } catch (Exception exc) {
            exc.printStackTrace(); // If there was an error, print the info.
        }
    }