How to make ellipses on the screen

So I started learning processing about 3 days ago, and I realy enjoyed what the program can do so far I know. But this morning I started working with arrays and objects and I couldnt figure out why my code wasnt working. If someone can please fix my code and also explain what I did wrong I would realy apriciate that <3

I want this code to make some ellipces on the screen

code:

Bubble[] b = new Bubble[10];
void setup() {
  size(600, 600);
  for (int i = 0; i < 10; i++) {
    b[i] = new Bubble(i + 1,i,100);
  }
}
void draw() {
  background(20);
  fill(255);
  for(int i = 0; i < 10; i++){
    b[i].display();
    
  }
 
}




class Bubble {
  float x, y, size;
  Bubble(float thisx, float thisy, float thissize) {

    x  = thisx;
    size  = thissize;
    y  = thisy;
  }
  void display() {
    fill(20);
    ellipse(x + 10, y + 10, size, size);
  }
}
1 Like

Hi! Maybe because background color = 20, fill color = 20 (set inside display()), so you can’t see anything?

2 Likes

Thank you very much, I just put random values there and got the same one twice thanks