I recently received a downvote for using the following in a recent answer:
String word = ...;
if (\"s\".equals(word) || \"y\".equals(word)
There are several reasons not to do it like that, however in the end it depends on you (or the team working on your product) if you think this is bad coding style. Arguments against it are:
As said I don't think these arguments are very strong, nor is the reason to do it like you. So it is mostly important to just agree on one way as your coding style and stick to that.