Java String.toLowerCase(Locale locale)

Syntax

String.toLowerCase(Locale locale) has the following syntax.

public String toLowerCase(Locale locale)

Example

In the following code shows how to use String.toLowerCase(Locale locale) method.


import java.util.Locale;
//  w  w  w.  j  a  va 2  s. c  om

public class Main {

  public static void main(String[] args) {
  
    String str = "java2s.com";


    System.out.println(str.toLowerCase(Locale.getDefault()));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable