package com.six.oneseven; //打印字符的ACSII码 public class Two { public void disAcsii(char ch){ int iTmp=(int)ch; System.out.println(ch+"的Ascii码是"+iTmp); } public static void main(String[] args) { Two two=new Two(); two.disAcsii('0'); two.disAcsii('9'); two.disAcsii('A'); two.disAcsii('Z'); two.disAcsii('a'); two.disAcsii('z'); } }
java程序——打印字符的ASCII码