Java String.toLowerCase() Method

 Posted On  | Yashwant Chavan 

In this tutorial you will learn about String.toLowerCase() method. It converts all of the characters in this String to lower case.

Refer below steps

  • String.toLowerCase() converts all of the characters in this String to lower case using the rules of the default locale.
  • Returns: The String, converted to lowercase.

Java String.toLowerCase() method example

package com.technicalkeeda.app;

public class StringToLowerCase {

    public static void main(String args[]) {
        String hello = "HELLO";
        System.out.println(hello.toLowerCase());
        hello = "Hello";
        System.out.println(hello.toLowerCase());
        hello = "HeLLo";
        System.out.println(hello.toLowerCase());
    }
}

Output

hello
hello
hello


© technicalkeeda.com 2017

 |  Find us on Google+ |  Rss Feed

Loaded in 0.0296 seconds.