String.toLowerCase(Locale locale) has the following syntax.
public String toLowerCase(Locale locale)
In the following code shows how to use String.toLowerCase(Locale locale) method.
import java.util.Locale; /*www . ja v a 2s. c o m*/ 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.