why does arraylist hold object rather than reference variable, as opposed to array holding reference variable or primitives? : [enter image description here][1]When I'm learning array's knowledge, there are such descriptions saying array holds reference variables(not object itself) or primitives, as opposed to arraylist holding object.I want to confirm why arraylist can hold object rather than reference variables. [enter image description here][3]


  [1]: https://i.stack.imgur.com/PZrow.png

  [3]: https://i.stack.imgur.com/BwH9U.png