import java.util.*; |
02 | import java.io.*; |
03 | import java.text.*; |
04 | public class Main { |
05 | public static void main(String args[]){ |
06 | Scanner input = new Scanner(System.in); |
07 | String str = input.next(); |
08 | System.out.println(str.toUpperCase()); |
09 | |
10 | } |
11 | } |
-
toUpperCase的意思是将所有的英文字符转换为大写字母,如:
String cc = “aBc123”.toUpperCase();结果就是:ABC123。
-
toLowerCase的意思是将所有的英文字符转换为小写字母,如:
String cc = “aBc”.toUpperCase();结果就是:abc123。
备注:这两个方法只对英文字母有效,对除了A~Z和a~z的其余字符无任何效果。