Share on Google+Share on Google+

java.lang.String.toLowerCase()

Advertisement
toLowerCase() is the method of the String class in Java, which is used to convert upper case characters into the lower case characters.

toLowerCase() is the method of the String class in Java, which is used to convert upper case characters into the lower case characters. The method name itself clear the purpose of the toLowerCase() string calss method... the given example will show you how to implement the toLowerCase() method in your code.

a simple String.tolowercase java example:

public class Lowercase

{

public static void main(String[] args)

{

String str = "CONVERT TO LOWER CASE JAVA EXAMPLE.";

// to convert the string to lowercase.

String lower = str.toLowerCase();

// Display the two strings for comparison.

System.out.println("Orignal Value = " + str);

System.out.println("Changed to lowercase = " + lower);

}

}

the output is:

Orignal Value = CONVERT TO LOWER CASE JAVA EXAMPLE.

Changed to lowercase = convert to lower case java example.

Example code

Alphabet Character Case-Converter

Advertisements

Advertisement

Posted on: March 27, 2005 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.