byte数据输出的问题(在线等待) 我不知道你用的那个类支不支持gb2312,不过你可以试试utf-8这种类型的文字! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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) { } }}这是我的简单代码~~输出的是地址,我需要输出的是“为宋”为什么没有输出 aa=bb.toString();是byte的字符串显示;要转换成字符串可以 String a= new String(Byte[]) 没有加编码String(byte[] bytes, String charsetName) Constructs a new String by decoding the specified array of bytes using the specified charset. 我靠,特别受到优待啊.先谢了.(努力冲星ing...) get方式分页查询条件乱码 hibernate 一对一,无法级联保存。 如何计算从用户登录到主页加载完得时间差 数据库问题 用IE打开APPLET的路径问题 配置数据库浏览器database explorer下面的database driver 最近公司的sql服务器总自动关掉。不知道为什么?帮忙看看 有关JSP映射问题 关于java,有谁能帮帮我啊,郁闷 oracle 中的图片在jsp中显示的问题 请推荐一本hibernate的入门书籍或资料,送上100分 关于98下tomcat的设置问题
{
public static void main(String args[])
{
try
{
String aa="为宋";
byte[] bb=aa.getBytes("gb2312");
aa=bb.toString();
System.out.println(aa);
}
catch(Exception e)
{
}
}
}这是我的简单代码~~输出的是地址,我需要输出的是“为宋”为什么没有输出
要转换成字符串可以 String a= new String(Byte[])
String(byte[] bytes, String charsetName)
Constructs a new String by decoding the specified array of bytes using the specified charset.
先谢了.
(努力冲星ing...)