Java program to Convert Lowercase Character to Uppercase Character

convert lowercase to uppercase java

In this tutorial, we are going to java a java program to convert lowercase characters (alphabet) into uppercase characters (alphabet).

For any input string, any lowercase character used in input string will be replaced with uppercase character of same alphabet as lowercase character.

For example

Case1: if user inputs ‘Quescol’

         The output should be ‘QUESCOL’

Case2: if user inputs ‘jaVa’

         The output should be ‘JAVA’

Java Program to Convert Lowercase Character to Uppercase Character

Output

Explanation

For the input string ‘Quescol’, all the lowercase letters i.e. ‘uescol’ is converted into respective uppercase i.e. ‘UESCOL’ While iterating through the string, the letters ‘u’, ‘e’, ‘s’, ‘c’, ‘o’, and ‘l’  return ‘True” as an output when is checked with ‘isLowerCase()’ function, then they are converted into respective uppercase letters using ‘isUpperCase()’ function and replaced simultaneously.