Return with "|"

Asked

Viewed 52 times

1

        public static final int corCombina(int cor1, int cor2) {
    if (!corValida(cor1)) return -1; //Se a cor1 não é válida, retorne -1...
    if (!corValida(cor2)) return -1; //Se a cor2 não é válida, retorne -1...

    return cor1 |cor2;
}

I found in one of the topics here, but as I am beginner in language, I did not understand the type of return "return cor1 | cor2", how does it work?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.