Skip to content

lowerCase() & upperCase()

toLowerCase()

Java String toLowerCase() method is used and operated over a string where we want to convert all letters or characters of the string to lowercase.

Usage and examples :

java
String s = "Hello World !";
String a = s.toLowerCase(); // "hello world !"

toUpperCase()

Java String toUpperCase() method is used and operated over a string where we want to convert all letters or characters of the string to uppercase.

Usage and examples :

java
String s = "Hello World !";
String a = s.toUpperCase(); // "HELLO WORLD !"