Java中大小写转换的方法有以下几种:
String str = "HelloWorld";
String upperCaseStr = str.toUpperCase();
System.out.println(upperCaseStr); // 输出:HELLOWORLD
String str = "HelloWorld";
String lowerCaseStr = str.toLowerCase();
System.out.println(lowerCaseStr); // 输出:helloworld
char c = 'a';
char upperCaseChar = Character.toUpperCase(c);
System.out.println(upperCaseChar); // 输出:A
char c = 'A';
char lowerCaseChar = Character.toLowerCase(c);
System.out.println(lowerCaseChar); // 输出:a