当前位置: 代码迷 >> J2SE >> a question about "byte"解决方法
  详细解决方案

a question about "byte"解决方法

热度:523   发布时间:2016-04-24 16:38:21.0
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();
一读一行
  相关解决方案