public void updateBullets(long time) {
    // Loop through all the available bullets
    for(int i = 0; i < bullets.length; i++) {
      // Try block for safety.
      try {
        // If the bullet is alive, then let's update it.
        if(bullets[i].living == true) { bullets[i].update(time); }
      }
      // If the bullet was never initialized, it'd throw a null pointer exception.
      catch(NullPointerException e) {
        // Right here I had copied the code from the spawnBullet method, and it was creating a new bullet every time the game started!
        // Anyway... If we throw this error, this means we've essentially hit the end of the list of bullets that exist, so we can break the loop here for efficiency.
        break;
        // Which means we won't check any more bullets after this one.
      }
    }
  }