JavaScript
For, While and Do While LOOP in JavaScript (with Example)
In this tutorial, we will learn- How to use Loop? Different Types of Loops for loop while loop...
This Java string method converts every character of the particular string into the lower case by using the rules of the default locale.
Note: This method is locale sensitive. Therefore it can show unexpected results if used for strings which are intended to be interpreted separately.
Syntax
public String toLowerCase()
Parameters
NA
Return Value
It returns the String, which is converted to lowercase.
Example 1:
public class gtupapers {
public static void main(String args[]) {
String S1 = new String("UPPERCASE CONVERTED TO LOWERCASE");
//Convert to LowerCase
System.out.println(S1.toLowerCase());
}
}
Output:
uppercase converted to lowercase
The toUppercase() method is used to convert all the characters in a given string to upper case.
Syntax:
toUpperCase()
Parameters:
NA
Returns value:
String in an uppercase letter.
Example 2:
public class gtupapers {
public static void main(String args[]) {
String S1 = new String("lowercase converted to uppercase");
//Convert to UpperCase
System.out.println(S1.toUpperCase());
}
}
Output:
LOWERCASE CONVERTED TO UPPERCASE
In this tutorial, we will learn- How to use Loop? Different Types of Loops for loop while loop...
What is ArrayList in Java? ArrayList in Java is a data structure that can be stretched to...
What is a Build Tool? A build tool is a programming tool which is used to build a new version of a...
What is split() string in Java? StrSplit() method allows you to break a string based on specific...
There are two ways to convert String to Integer in Java, String to Integer using...
In this tutorial, we will learn about Generate Random Numbers- Using Java Random Class Using Java...