Receiving error but cannot debug: ArrayIndexOutOfBoundsException

This would toggle on key b

if (keyPressed) {
  if ( key == ‘b’) {
    screen1bool= ! screen1bool;
  }
}
1 Like