Java String.toLowerCase() Method

Java String.toLowerCase() Method

By Yashwant Chavan, Views 1018, Date 16-Nov-2016

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

tags java

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

Suggested Posts

Yashwant

Yashwant

Hi there! I am founder of technicalkeeda.com and programming enthusiast. My skills includes Java,J2EE, Spring Framework, Nodejs, PHP and lot more. If you have any idea that you would want me to develop? Lets connect: yashwantchavan[at][gmail.com]