Convert uppercase String to lowercase String in Java

toLowerCase() method of String class can be used to convert a uppercase string to lowercase string in Java.

toLowerCase() method returns a lowercase string after processing.


Example 1

class UcToLcTest{

public static void main(String args[]){

String uc="RAMS";

String lc=uc.toLowerCase();

System.out.println("Lowercase string is "+lc);

}

}

Output 1

Lowercase string is rams


Example 2

class UcToLcTest{

public static void main(String args[]){

String cu="KRISH";

String cl=cu.toLowerCase();

System.out.println("Lowercase string is "+cl);

}

}

Output 1

Lowercase string is krish