Java toLowerCase() Method
The toLowerCase() method converts the string to lowercase.
Syntax
public String toLowerCase()
或
public String toLowerCase(Locale locale)
Parameters
-
None
Return Value
The string converted to lowercase.
Example
public class Test {
public static void main(String args[]) {
String Str = new String("WWW.RUNOOB.COM");
System.out.print("返回值 :" );
System.out.println( Str.toLowerCase() );
}
}
The execution result of the above program is:
返回值 :www.runoob.com
Java String class