将小写字母转换成大写字母

package demo1;

import java.util.Scanner;

public class ch03 {
	public static void main(String[] args) {
		System.out.println("请输入一个小写字符串");
		Scanner input=new Scanner(System.in);
		String str1=input.next();
		//String str2=str1.toUpperCase();
		System.out.println(str1.toUpperCase());
	}

}

  

原文地址:https://www.cnblogs.com/www-x/p/8087816.html