I want to check a char variable is one of 21 specific chars, what is the shortest way I can do this?
For example:
if(symbol == (\'A\'|\'B\'|\'C\')){}
you can use this:
if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ".contains(String.valueOf(yourChar)))
note that you do not need to create a separate String with the letters A-Z.