大写转小写:toLowerCase();
小写转大写:toUpperCase();
public static void main(String[] args) {
//将一组小写的字母转换成a->A形式输出
String sum[] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
for (int i=0;i<sum.length;i++){
System.out.println(sum[i]+"->"+sum[i].toUpperCase());
}
//将大写字母转小写,再以A->a形式输出
String count[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
for (int i=0;i<sum.length;i++){
System.out.println(count[i] + "->" + count[i].toLowerCase() );
}
}