提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
字符串为大写
// 来自 NowJava.com - 时 代 Java public class Main { public static void main(String[] args) { String str = "string touppercase example"; String strUpper = str.toUpperCase(); System.out.println("Original String: " + str); System.out.println("String changed to upper case: " + strUpper); } }