我不知道你用的那个类支不支持gb2312,不过你可以试试utf-8这种类型的文字!

解决方案 »

  1.   

    class ASD
    {
    public static void main(String args[])
    {
    try
    {
    String aa="为宋";
    byte[] bb=aa.getBytes("gb2312");
    aa=bb.toString();

    System.out.println(aa);
    }
    catch(Exception e)
    {
    }
    }
    }这是我的简单代码~~输出的是地址,我需要输出的是“为宋”为什么没有输出
      

  2.   

    aa=bb.toString();是byte的字符串显示;
    要转换成字符串可以 String a= new String(Byte[])
      

  3.   

    没有加编码
    String(byte[] bytes, String charsetName) 
              Constructs a new String by decoding the specified array of bytes using the specified charset.
      

  4.   

    我靠,特别受到优待啊.
    先谢了.
    (努力冲星ing...)