小写转大写:toUpperCase()
大写转小写:toLowerCase()
public class HelloWorld {
public static void main(String []args) {
String STR="abcdefg";
String STR1=STR.toUpperCase(); //toUpperCase() 小写转大写
System.out.println("STR小写转大写:"+STR1);
String str="ABCDEFG";
String str1=str.toLowerCase(); //toLowerCase() 大写转小写
System.out.println("str大写转小写:"+str1);
}
}