首页上一页 1 下一页尾页 1 条记录 1/1页
java从入门到精通第四版8.07求解答
发表在Java图书答疑
2017-03-02
是否精华
是
否
版块置顶:
是
否
public class CharacterCompare {
public static void main(String args[]) {
Character char1 = new Character('h');
Character char2 = new Character('H');
boolean b = char1.equals(char2);
System.out.println(char1+"和"+char2+"是否相等:"+b);
Character char3 = Character.toLowerCase(char1);
Character char4 = Character.toLowerCase(char2);
boolean bb = char3.equals(char4);
System.out.println(char3+"和"+char4+"是否相等:"+bb);
}
}
于2017-03-02 21:32:31编辑