class TestCharset
{
private void execute()
{
String s = "Hello World! 我是张三";
byte[] bytes = s.getBytes();
System.out.println("bytes lenght is:" + bytes.length);
}
public static void main(String[] args)
{
try
{
new TestCharset().execute();
}
catch(Exception ex)
{
System.out.println("" + ex.toString());
}
finally
{
System.out.println("/nIt's Over,Successful !/n");
}
}
}

被折叠的 条评论
为什么被折叠?



