String.equals()与String.equalsIgnoreCase( )区别

String.equals()与String.equalsIgnoreCase( )区别
/**
* String.equals()对大小写敏感! * String.equalsIgnoreCase( )则忽略大小写
*/ public static void main(String[] args) { System.out.println("aa".equals("AA")); System.out.println("aa".equalsIgnoreCase("AA")); } //============== false true

 

posted @ 2024-09-23 18:13  未来的羁绊  阅读(5)  评论(0编辑  收藏  举报