把从键盘中输入的小写字母转化成大写字母并输出
文章图片
【小写字母转化大写字母】
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String str = sc.next();
str =str.toUpperCase();
System.out.println(str);
}
把从键盘中输入的小写字母转化成大写字母并输出
文章图片
【小写字母转化大写字母】
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String str = sc.next();
str =str.toUpperCase();
System.out.println(str);
}