首页 > 代码库 > Character Comparison
Character Comparison
public static void main(String [] args) throws InterruptedException { System.out.println("a-z: "+(‘a‘-‘z‘)); System.out.println("a-A: "+(‘a‘-‘A‘)); System.out.println("a-Z: "+(‘a‘-‘Z‘)); System.out.println("A-Z: "+(‘A‘-‘Z‘)); System.out.println("A-9: "+(‘A‘-‘9‘)); System.out.println("a-0: "+(‘a‘-‘0‘)); System.out.println("z-0: "+(‘z‘-‘0‘)); System.out.println("z-A: "+(‘z‘-‘A‘)); System.out.println("z-Z: "+(‘z‘-‘Z‘)); System.out.println("A-0: "+(‘A‘-‘0‘)); System.out.println("Z-0: "+(‘Z‘-‘0‘)); }
Output
a-z: -25 a-A: 32 a-Z: 7 A-Z: -25 A-9: 8 a-0: 49 z-0: 74 z-A: 57 z-Z: 32 A-0: 17 Z-0: 42
So the summary is:
0 < 9 < A < Z < a < z
Character Comparison
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。