Convert All Characters In A String To Lowercase | Java Programs

Output:

*** LowerCase String ***

Original String:     This IS a TEst
LowerCasingString:   this is a test

Click Here For Java Online Compiler

Solution:

public class LowercaseString {

    public static void main(String[] args) {
        System.out.println("*** LowerCase String ***" + "\n");
        String str = "This IS a TEst";
        // Convert the above string to all lowercase.
        String lowerStr = str.toLowerCase();

        System.out.println("Original String:     " + str);
        System.out.println("LowerCasingString:   " + lowerStr);
    }
}
Share This :

Related Post



sentiment_satisfied Emoticon