What is String.toLowerCase() in Java?
The toLowerCase() function converts a string to lowercase.
The following figure shows a visual representation of the toLowerCase() function.
Syntax
String toLowerCase()
// Usage
string_1.toLowercase()
Parameter
The toLowerCase() function does not require a parameter.
Return value
The toLowerCase() function returns a string that is converted to lowercase.
Code
class JAVA {public static void main( String args[] ) {String string="EDUCATIVE";String string_1="eDUCATIVE09";//to lowercase stringSystem.out.println("string.toLowerCase():");System.out.println(string.toLowerCase());//to lowercase string and numberSystem.out.println("string_1.toLowerCase():");System.out.println(string_1.toLowerCase());}}