代碼
提交代碼
public class StringMethod5 {
public static void main(String[] args) {
String str = "HELLO world";
String s = str.toLowerCase();
System.out.println("字符串str為轉(zhuǎn)換為小寫后為:" + s);
String s1 = s.toUpperCase();
System.out.println("字符串s為轉(zhuǎn)換為大寫后為:" + s1);
}
}
運(yùn)行結(jié)果