'Equals() returns false on 'Y' but returns true on 'Yes'

I'm doing an if statement in mybatis, and <if test="param.equals('Y')"> returns false even when the param is "Y", but <if test="param.equals('Yes')"> returns true when the param is "Yes", why is this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source