?? equalandignorecase.java
字號(hào):
//demonstrate the usage of methods equals() and equalsIgnoreCase().
public class EqualAndIgnoreCase {
public static void main(String[] args) {
// TODO Auto-generated method stub
String s1 = new String("May you happy!");
String s2 = new String("May you happy!");
String s3 = new String("a good day!");
String s4 = new String("MAY YOU HAPPY!");
System.out.println(s1+" equals "+s2+" ? "+s1.equals(s2));
System.out.println(s1 +" equals "+s3+" ? "+s1.equals(s3));
System.out.println(s1+" equals "+s4+" ? "+s1.equalsIgnoreCase(s4));
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -