Java String toLowerCase() Method Last Updated : 23 Dec, 2024 Comments Improve Suggest changes Like Article Like Report Java String toLowerCase() method is used to convert all letters to lowercase in a given string.Example: Java import java.util.*; class Geeks { public static void main(String args[]) { // Custom input string String s = "Geeks for Geeks"; // Converting string s to lowercase letter String s2 = s.toLowerCase(); System.out.println(s2); } } Outputgeeks for geeks Syntax of toLowerCase()public String toLowerCase ()Return Value : Returns a string in lowercase letter.Internal Working of toLowerCase()The Locale class is part of java.util package. It is used for extracting and manipulating the information. Locale object represents a geographical, political, or cultural region. The package view of the method is as follows: --> java.util Package --> String Class --> toLowerCase() Method Example Statement// Creates a Locale for the English languageLocale locale1 = new Locale("en"); It plays a vital role in toLowerCase() conversion where it checks the elements and helps to convert them into Lower Case. To know more about the topic refer to Locale article.Note: Internally toLowerCase() works in similar way as toLowerCase(Locale.getDefault()) method.Java toLowerCase(Locale loc) Converts all the characters into lowercase using the rules of the given Locale.Syntax of toLowerCase()public String toLowerCase (Locale loc)Parameters: Locale value to be applied.Return Value: Returns a string in lowercase letter.Example: Java // Working of toLowerCase() Method // present inside Locale class import java.util.Locale; class Geeks { public static void main(String args[]) { String s = "I Know YOI Bui You Don't Know ME"; // Locales with the language "tr" for TURKISH //"en" for ENGLISH is created Locale TURKISH = Locale.forLanguageTag("tr"); Locale ENGLISH = Locale.forLanguageTag("en"); // Converting string s to lowercase letter // using TURKISH and ENGLISH language String str1 = s.toLowerCase(TURKISH); String str2 = s.toLowerCase(ENGLISH); System.out.println(str1); System.out.println(str2); } } Outputı know yoı bui you don't know me i know yoi bui you don't know me Comment More infoAdvertise with us Next Article Java String toLowerCase() Method N Niraj_Pandey Follow Improve Article Tags : Java DSA Java-Strings Java-Functions Practice Tags : JavaJava-Strings Similar Reads Java String toUpperCase() Method Java String toUpperCase() method of String class is used to convert all characters of the string into an uppercase letter. Example:Javaclass Geeks { public static void main(String args[]) { // Custom input string String str = "Geeksforgeeks"; // Converting above input string to // uppercase letters 2 min read StringJoiner toString() method in Java The toString() of StringJoiner is used to convert StringJoiner to String. It returns the current value, consisting of the prefix, the values added so far separated by the delimiter, and the suffix, unless no elements have been added in which case, the prefix + suffix or the emptyValue characters are 2 min read JSTL fn:toLowerCase() Function In JSTL, the fn:toLowerCase function converts all the characters of the input or specified string into the lowercase format. This allows the developers to transform the string case with the JavaServer Pages and also ensures the proper representation of text in lowercase. In this article, we will see 2 min read Short shortValue() Method in Java The shortValue() is an inbuilt method of the Short class in Java and is used to return the Short value of this value. Syntax: public short shortValue() Parameters: The method does not take any parameter. Return Value: The method returns the numeric value represented by this object after conversion t 2 min read Java String contains() Method with Example The String.contains() method is used to search for a sequence of characters within a string. In this article, we will learn how to effectively use the string contains functionality in Java.Example:In this example, we check if a specific substring is present in the given string.Java// Java Program to 3 min read NavigableSet lower() method in Java The lower() method of NavigableSet interface in Java is used to return the greatest element in this set strictly less than the given element, or null if there is no such element exists in the set. Syntax: E lower(E ele) Where, E is the type of elements maintained by this Set container. Parameters: T 2 min read Java String compareTo() Method with Examples Strings in Java are objects that are supported internally by an array only which means contiguous allocation of memory for characters. Please note that strings are immutable in Java which means once we create a String object and assign some values to it, we cannot change the content. However, we can 7 min read Java String codePoint() Method with Examples A Java string consists of a group of characters and each character is associated with a Unicode point value (alias ASCII value). So to get the Unicode point value of a character in a string we will use the codepoint() method. So in order to move further, we need to know what are the associated Unico 4 min read Java String equalsIgnoreCase() Method In Java, equalsIgnoreCase() method of the String class compares two strings irrespective of the case (lower or upper) of the string. This method returns a boolean value, true if the argument is not null and represents an equivalent String ignoring case, else false.Input: str1 = "pAwAn"; str2 = "PAWa 1 min read Java String startsWith() Method with Examples In Java, the startsWith() method of the String class is used to check if a string starts with the given prefix. The startsWith() method is present in the java.lang package. In this article, we will learn how to use the startsWith() method in Java.Example:In the below example, we will use the startsW 2 min read Like