The last approach is much more useful if you needed more than one choice and you need them to be unique, but it conceptually works like the sides of a coin or deck of cards: if you shuffle (4, -4) and then take the top number, it is one or the other.
Answers
https://Processing.org/reference/conditional.html
if(random(100) < 50)
int rnd=-4;
else rnd=4;
In your case, conceptually, some of the many options:
you can imagine multiplying 4 by a random (1 or -1),
more generally you can imagine testing a random (0-1) to see if it is above or below .5, then choose one of two numbers accordingly.
You could create a list of numbers and then choose one by shuffling.
The last approach is much more useful if you needed more than one choice and you need them to be unique, but it conceptually works like the sides of a coin or deck of cards: if you shuffle (4, -4) and then take the top number, it is one or the other.