![array java array java](http://www.btechsmartclass.com/java/java_images/java-sum-of-all-elements-example.png)
![array java array java](https://www.tutorialgateway.org/wp-content/uploads/Java-Array-example-1.png)
There is the class I mentioned in the comment we had with Sean Patrick Floyd : I did it with a peculiar use which needs WeakReference, but you can change it by any object with ease. The Array class provides static methods to dynamically create and access Java arrays.