indexOf Case Sensitive?

后端 未结 19 1150
日久生厌
日久生厌 2020-11-27 19:39

Is the indexOf(String) method case sensitive? If so, is there a case insensitive version of it?

相关标签:
19条回答
  • 2020-11-27 20:03

    indexOf is case sensitive. This is because it uses the equals method to compare the elements in the list. The same thing goes for contains and remove.

    0 讨论(0)
提交回复
热议问题