package HelloWorld;
import java.util.Scanner;//导入包
public class mathdemo {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner getkey=new Scanner(System.in);
int x='王';//将char类型自动转换为int类型
int z='刚';
System.out.println("王的Unicode是:"+x);
System.out.println("刚的Unicode是:"+z);
System.out.println("请输入数字");
int a=getkey.nextInt();//获取Unicode
char b=(char)a;
System.out.println("新的字符是:"+b);
}
}>??????????
添加回答
举报
0/150
提交
取消