I have part of the code that looks something like this:
if(c1=='a') myStack.push(c1); else if(c1=='b') myStack.push(c1); else if(c1=='c') myStack.push(c1);
I just want to ask is there any way to rewrite this code, to make it more compact
if(c1==('(a'||'b'||'c') // I know this doesn't work
but I'm looking something that would be nice and short.