Convert String to LowerCase in Java
Convert String to LowerCase in Java Example describes about Converting a String to LowerCase in Java.
For converting a string to lowercase in java, you can use the following method of String class
String toLowerCase() will transforms all characters of a particular String into lower case characters according to the current locale.
String toLowerCase(Locale locale)method will transforms all characters of a particular String into lower case characters according to the given Locale specified.
Convert String to LowerCase in Java
public class ConvertToLowerCase {
public static void main(String[] args) {
String str = "HOW ARE YOU";
// Convert to Lower Case
String lower = str.toLowerCase();
System.out.println(lower);
}
}
public static void main(String[] args) {
String str = "HOW ARE YOU";
// Convert to Lower Case
String lower = str.toLowerCase();
System.out.println(lower);
}
}