明白了, 刚晕了 哈哈谢谢大家, 这个就是一个忽略大小写判断是否相等而已. 证明休息还是很重要的 哈哈
First of all, this code does not need to use equalsIgnoreCase,用equals.
equalsIgnoreCase
equals
Secondly, doeYear, doeMonth, doeDay可能在业务上定义了-1为非法值,所以这里要对这3个值进行校验(检查是否为空或者等于-1).
doeYear
doeMonth
doeDay
-1
Regardless of the context, just looking at the code is just to judge whether -1跟doeDay is equal. You were confused when you saw that case is ignored.
What the hell are doeMonth, doeDay, and doeYear? The context of the code must be posted. Who knows what you want to express? Ask questions professionally
First of all, this code does not need to use
equalsIgnoreCase
,用equals
.Secondly,
doeYear
,doeMonth
,doeDay
可能在业务上定义了-1
为非法值,所以这里要对这3个值进行校验(检查是否为空或者等于-1
).Regardless of the context, just looking at the code is just to judge whether
-1
跟doeDay
is equal. You were confused when you saw that case is ignored.What the hell are doeMonth, doeDay, and doeYear? The context of the code must be posted. Who knows what you want to express? Ask questions professionally