我不明白为什么以下逻辑不起作用:
if (cursorCount > 1 && (!"x".equals(componentType) || !"y".equals(componentType))){
message.append("s");
}
Run Code Online (Sandbox Code Playgroud)
所以我想打印's'如果光标数超过1,但只有当componentType不等于x或y时才打印's'.
似乎适用于y但不是x有趣的案例.
Confused.com!:)