1.字母大小写转换:

package com.imooc;

public class SortDemo {

    public static void main(String[] args) {
char chL='a';
char chU='B';
//小写a转换为大写A
System.out.println(Character.toUpperCase(chL));
//大写B转换为小写b
System.out.println(Character.toLowerCase(chU));
} }
05-11 19:23