String.equals()和String.equalsIgnoreCase()的区别
String.equals()对大小写敏感,而String.equalsIgnoreCase()忽略大小写
例如:"ABC".equals("abc")是false
"ABC".equalsIgnoreCase("abc")为ture
时间: 2024-12-06 01:23:48
String.equals()对大小写敏感,而String.equalsIgnoreCase()忽略大小写
例如:"ABC".equals("abc")是false
"ABC".equalsIgnoreCase("abc")为ture