public class 大小写转换 {
public static void main(String[] args) {
String 字符串 = "fdsfssafhdsklfq9eufAKG as JL GSDFoNSKLDJBl";
byte[] 字符数组 = 字符串.getBytes();
for(int i = 0;i<字符数组.length;i++)
if(字符数组[i]>=97 && 字符数组[i]<=122)
字符数组[i] -= 32;
System.out.println(new String(字符数组));
}
}
public static void main(String[] args) {
String 字符串 = "fdsfssafhdsklfq9eufAKG as JL GSDFoNSKLDJBl";
byte[] 字符数组 = 字符串.getBytes();
for(int i = 0;i<字符数组.length;i++)
if(字符数组[i]>=97 && 字符数组[i]<=122)
字符数组[i] -= 32;
System.out.println(new String(字符数组));
}
}