下面是我的代码,它打印出 J=74、A =65 和 M=77。作为向下移动字母表的结果,我如何让它只打印字符 K、B、N?
BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
String string = JOptionPane.showInputDialog( " Please Enter Code " );
for (int i = 0; i < string.length (); ++i) {
char c = string.charAt(i);
int j = (int)c;
}
System.out.println("ASCII OF "+c +" = " + j + ".");