java tutorial - Java Strings toLowerCase() method - java programming - learn java - java basics - java for beginners
![Java strings to lower case](https://wikitechy.com/tutorials/java/img/java-images/java-strings-to-lower-case.gif)
Learn Java - Java tutorial - Java strings to lower case - Java examples - Java programs
Description
- The toLowerCase () method has two options.
- First option converts each and every character in a given string into lowercase by using the rules of locale. This is equivalent of calling toLowerCase (Locale.getDefault ()).
- Second option takes the locale as an argument to use during the conversion of lowercase.
Syntax
Syntax method:
public String toLowerCase()
or
public String toLowerCase(Locale locale)
click below button to copy the code. By - java tutorial - team
Options
Detailed information about the parameters:
- no.
Return value
- In Java, toLowerCase () returns a string that is converted to lowercase.
Sample Code
import java.io.*;
public class Test {
public static void main(String args[]) {
String Str = new String("Welcome to wikitechy.com");
System.out.print("Return Value :");
System.out.println(Str.toLowerCase());
}
}
click below button to copy the code. By - java tutorial - team
Output
Return Value :welcome to wikitechy.com