Ball[] ourBalls; int numBalls = 50; void setup() { size(500,500); ourBalls = new Ball[numBalls]; for (int i = 0; i < ourBalls.length; i++) { // Using the overloaded constructor // Ball(int windowWidth, int windowHeight, int ballSize, int xPosition, int yPosition, int xDirection, int yDirection) // Picking some values just to see what happens ourBalls[i] = new Ball(width, height, i+10, i+1, i-1, i, 1 - i); } } void draw() { background(0); for (int i = 0; i < ourBalls.length; i++) { ourBalls[i].display(); } }