有时候我们需要忽略大小写比较两个字符串是否相等
使用String类中的函数
样例
package www.wangchong.study;
/**
* @author wangchong
* @date 2019/5/3 10:15
* @email 876459397@qq.com
* @CSDN https://blog.csdn.net/wfcn_zyq
* @describe
*/
public class IgnoreUpperLowerCase {
public static void main(String[] args) {
String a = "ABC";
String b = "abc";
System.out.println(a.equalsIgnoreCase(b));
}
}
输出