String.equals()和String.equalsIgnoreCase()的区别
String.equals()对大小写敏感,而String.equalsIgnoreCase()忽略大小写
例如:"ABC".equals("abc")是false
"ABC".equalsIgnoreCase("abc")为ture
时间: 2024-10-05 19:49:08
String.equals()对大小写敏感,而String.equalsIgnoreCase()忽略大小写
例如:"ABC".equals("abc")是false
"ABC".equalsIgnoreCase("abc")为ture