Home >>Java String Methods >Java String toLowerCase() Method
Java toLowerCase() method in Java String is used to converts a string to lower case letters.
public String toLowerCase()
None
It is used to return A String value which representing the new string converted to lower case
public class MyClass
{
public static void main(String[] args)
{
String str = "Hello Phptpoint";
System.out.println(str.toUpperCase());
System.out.println(str.toLowerCase());
}
}
import java.util.Locale;
public class MyClass
{
public static void main(String[] args)
{
String nm = "PHPTPOINT WoRld HELLO stRIng";
String eng = nm.toLowerCase(Locale.ENGLISH);
System.out.println(eng);
}
}