我不说多余的话,直接看看代码吧~
package com.jalor;
公共类AAAA {
publicstaticvoidmain (字符串[ ] args ) {
输出(65;
outputa(97;
}
打印ascii代码表
publicstaticvoidoutputa (int count ) {
for(intI=0; i 26; I ) {
system.out.print((char ) ) (count i );
}
System.out.println (;
}
}
补充知识: java显示ASCII代码字符表的打印来源! 到的字符,每行10个字符
公共类ascii table {
publicstaticvoidmain (字符串[ ] args ) {
{
int i=0;
int count=0;
for(I=33; i=126; I )
{
System.out.printf('<;' 、I );
出局;
if(count==0)//这里改为10的话每行打印10个。
system.out.println(n );
}
system.out.println(n );
}
}
}
执行结果:
! “# $ %”() *
、- ./0 1 2 3 4
5 6 7 8 9 :=
? @ A B C D E F G H
I J K L M N O P Q R
S T U V W X Y Z [
] ^ _ ` a b c d e f
g h i j k l m n o p
q r s t u v w x y z
{|}
以上JAVA实现了打印ascii码,是编辑分享给大家的全部内容。 希望能作为参考。 另外,希望多支持编剧。