search

Home  >  Q&A  >  body text

java - equalsIgnoreCase方法的使用

明白了, 刚晕了 哈哈
谢谢大家, 这个就是一个忽略大小写判断是否相等而已.
证明休息还是很重要的 哈哈

巴扎黑巴扎黑2783 days ago887

reply all(3)I'll reply

  • 迷茫

    迷茫2017-04-18 10:06:57

    First of all, this code does not need to use equalsIgnoreCase,用equals.

    Secondly, doeYear, doeMonth, doeDay可能在业务上定义了-1为非法值,所以这里要对这3个值进行校验(检查是否为空或者等于-1).

    reply
    0
  • PHPz

    PHPz2017-04-18 10:06:57

    Regardless of the context, just looking at the code is just to judge whether -1doeDay is equal. You were confused when you saw that case is ignored.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:06:57

    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

    reply
    0
  • Cancelreply