Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Visual Studio 2005

Converts all the characters in a String to lowercase.

public String toLowerCase()

A String object containing all the characters of the current String converted to lowercase.

// string_tolowercase1.jsl

public class Program
    public static void main(String[] args)
        String str = "ThIs Is HaRd To ReAd.";

        // Convert the above string to all lowercase.
        String lowerStr = str.toLowerCase();

        // Display the two strings for comparison.
        System.out.println("old = " + str);
        System.out.println("lowercase = " + lowerStr);

old = ThIs Is HaRd To ReAd.
lowercase = this is hard to read.
© 2015 Microsoft