#Hey guys im refreshing my knowledge on java, can someone tell me why this doesnt work?

1 messages · Page 1 of 1 (latest)

vagrant nebula
#
if (s.charAt(0) == ('(' | '{' | '[')){
            first = true;
        }

Im relearning the boolean stuff
like it runs but doesnt return true like you would hope it would
if the string is one of those things.

wooden ingotBOT
#

This post has been reserved for your question.

Hey @vagrant nebula! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

peak turret
#

firstly, | is bitwise or, nor normal "or"

#

you can't do multi checking like that in any language

#

the phrase "a is b or c" in english is short for "a is b or a is c"

vagrant nebula
#

Thanks! sry about the crosspost im new here