字符串的大小写转换
toLowerCase()
转换为小写
toUpperCase()
转换为大写
视频
package bank.com;
import java.util.Scanner;
public class test {
public static void main(String[] args) {
String a = "heLLo JavA";
String b = a.toLowerCase();
System.out.println("转换为小写的情况:");
System.out.println(a);
System.out.println(b);
System.out.println("转换为大写的情况:");
System.out.println(a);
String c = a.toUpperCase();
System.out.println(c);
}
}