char数据可以放入int[]中会自动转换

int[] ary ={'b','c','a','d','e','f'};
System.out.println(ary[0]);//98
String str = new String(ary, 2, 3);
System.out.println(str);//ade
posted @ 2020-09-11 00:31  三号小玩家  阅读(195)  评论(0)    收藏  举报
Title
三号小玩家的 Mail: 17612457115@163.com, 联系QQ: 1359720840 微信: QQ1359720840