首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

a question about "byte"解决方法

2012-01-24 
a question about byteintlenin.numBytes()bytearray[]in.readBytes(len)for(inti0i array.lengt

a question about "byte"
int   len   =   in.numBytes();
byte   array[]   =   in.readBytes(len);
for(int   i=0;   i <array.length;   i++   )
      System.out.println(array[i]);/*******how   can   I   print   char?*******

Now,   it   just   can   print   integer.   But   I   want   print   character.

[解决办法]
System.out.println(new String(array));
[解决办法]
楼上正解。要不你就用String s = ins.readline();
一读一行

热点排行