public class HelloWorld {
public static void main(String args[]){// String args[]字符串数组的意思
String str = "helloworld";
byte data[] = str.getBytes();//将字符串变成字节数组
for(int x = 0;x < data.length;x++){
data[x] -= 32;
}
System.out.println(data);
System.out.println(new String(data));
System.out.println(new String(data,0,5));
}
}
标签:7.10,字节,System,println,字符串,out,data,String
From: https://www.cnblogs.com/pansidong/p/17461892.html