NullPointerException in Processing Please : I am making an animation in Processing it is a simulation of a ball going up and coming down, I have an error saying 'NullPointerException' it keeps appearing I will give the code and show the error place.: 

    Obj[] objs = new Obj[100];
    
    void setup(){
      size(1000, 1000);
    }
    
    void draw(){
      background(250);
      for(int i = 0; i < objs.length; i++){
        objs[i].render();
        objs[i].up();
        objs[i].run();
      }
    }
    
    the error is at objs[i].render();

here is the code for Obj:

      class Obj{
      float x;
      float y;
      float speed;
      float pspeed;
      float velocity;
      void render(){
        fill(0);
        ellipse(x, y, 5, 5);
      }
      void up(){
        x = random(-1000, 1000);
        y = y-1010;
      }
      void run(){
        speed = random(4, 6);
        pspeed = speed;
        velocity = 0.05; 
        while(y<random(700, 1100)){
          y=y-speed;
          speed=speed-velocity;
        }
        
        while(y>0){
          y=y+pspeed;
          pspeed = pspeed - velocity;
        }
      }
    }

Plz help!