If statements within an array of digits

.equals() is important for Strings. Use == for ints and floats.

If you have many single value checks against the same variable this:

if (a == 1) {
}
else if (a == 2) {
}
else if (a == 3) {
}
//...

…then consider using a switch statement with case.

https://processing.org/reference/switch.html