Home Tutorial Java StringExamples java.lang.String.toLowerCase()

 
 

Share on Google+Share on Google+
java.lang.String.toLowerCase()
Posted on: March 27, 2005 at 12:00 AM
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

Advertisement

Related Tags for java.lang.String.toLowerCase():


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.

Posted on: March 27, 2005

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com