The use of arrays and list

Person[] p = new Person[10];//Person
ArrayList<Person> pList = new ArrayList<Person>();

both p and pList above can be used to store data of person type. How to choose?
an array of functions that can be implemented by ArrayList can also be realized, so why is there ArrayList?

Mar.02,2021

ArrayListObject
 transient Object[] elementData

 private void grow(int minCapacity) {
        // overflow-conscious code
        int oldCapacity = elementData.length;
        int newCapacity = oldCapacity + (oldCapacity >> 1);
        if (newCapacity - minCapacity < 0)
            newCapacity = minCapacity;
        if (newCapacity - MAX_ARRAY_SIZE > 0)
            newCapacity = hugeCapacity(minCapacity);
        // minCapacity is usually close to size, so this is a win:
        elementData = Arrays.copyOf(elementData, newCapacity);
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35e3a-4ec34.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35e3a-4ec34.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?