将此String中的所有字符转换为小写,这等同于调用toLowerCase(Locale.getDefault())。
String toLowerCase() - 语法
public String toLowerCase()
String toLowerCase() - 返回值
- 它返回转换为小写字母的字符串。
String toLowerCase() - 示例
import java.io.*; public class Test { public static void main(String args[]) { String Str=new String("Welcome to Learnfk.com"); System.out.print("返回值 :"); System.out.println(Str.toLowerCase()); } }
这将产生以下输出-
返回值 :welcome to learnfk.com