Currently, I am exploring how to utilize a Global Array with 500 elements and incorporating an image in jpg format that is sized at 20x20. The main objective is to have the image replicated on the screen multiple times.
Here is my current progression:
(function(food) {
food.arr[500];
} ) (this);
I am pondering over the method of randomly replicating the image each time it is called upon. How can this task be accomplished?
Please note that I am only considering Java for this task, not JavaScript.