string.toLowerCase();
Character.toLowerCase(char ch)
String str = "";
str = str.toLowerCase();
"Hello World".toLowerCase()
String s1 = "JAVATPOINT HELLO stRIng";
String s1lower = s1.toLowerCase(); // s1lower = "javatpoint hello string"
String var_name = "Spider";
System.out.println(var_name.toLowerCase()); //spider
// check lowercase or not in java..
public class Test {
public static void main(String args[]) {
System.out.println(Character.isLowerCase('c')); //true
System.out.println(Character.isLowerCase('C')); //false
System.out.println(Character.isLowerCase('
')); //false
System.out.println(Character.isLowerCase(' ')); //false
}
}
The toLowerCase() method converts a string to lower case letters. Note: The toUpperCase() method converts a string to upper case letters
public class Test {
public static void main(String args[]) {
System.out.println(Character.isLowerCase('c'));
System.out.println(Character.isLowerCase('4'));
System.out.println(Character.isLowerCase('
'));
System.out.println(Character.isLowerCase(' '));
}
}