java 大小写转换及数组转换字符
public class mainclass {
public static void main(string[] arg) {
char[] ch = {'a','b','c','d'};
system.out.println(string.valueof(ch));
}
}
大写转换小写
public class main {
public static void main(string[] args) {
string str = "this is a test";
str = str.tolowercase();
system.out.println(str);
}
}
//this is a test
小写转换大写
public class main {
public static void main(string[] args) {
string str = "this is a test";
str = str.touppercase();
system.out.println(str);
}
}
//this is a test
时间: 2024-10-15 03:04:30