Java 实例 - 字符串小写转大写
Java 教程
· 2019-02-10 08:27:14
以下实例使用了 String toUpperCase() 方法将字符串从小写转为大写:
StringToUpperCaseEmp.java 文件
public class StringToUpperCaseEmp {
public static void main(String[] args) {
String str = "string codercto";
String strUpper = str.toUpperCase();
System.out.println("原始字符串: " + str);
System.out.println("转换为大写: " + strUpper);
}
}
以上代码实例输出结果为:
原始字符串: string codercto 转换为大写: STRING CODERCTO
点击查看所有 Java 教程 文章: https://codercto.com/courses/l/12.html
The Art of Computer Programming, Volumes 1-3 Boxed Set
Donald E. Knuth / Addison-Wesley Professional / 1998-10-15 / USD 199.99
This multivolume work is widely recognized as the definitive description of classical computer science. The first three volumes have for decades been an invaluable resource in programming theory and p......一起来看看 《The Art of Computer Programming, Volumes 1-3 Boxed Set》 这本书的介绍吧!