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的其餘字符無任何效果。