Java toLowerCase() Method
The toLowerCase() method converts a 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.example.com");
System.out.print("返回值 :" );
System.out.println( Str.toLowerCase() );
}
}
The above program produces the following result:
返回值 :www.example.com
Other Extensions
Java String Class