35. JAVA Program To Learn how to convert lowercase letter to uppercase letter.
How does this program work?
- In this program your going to learn about how to scan a character.
- And converting lowercase letter into uppercase.
- By using string function we can easily convert lowercase to uppercase and viceversa.
Here is the code
//Convert Lowercase Character to Uppercase.
import java.util.Scanner;public class letter
{
public static void main(String[] input )
{
String strUpper, strLower;
System.out.print("Enter name in Lowercase :\n ");
Scanner obj = new Scanner(System.in );
strUpper = obj.nextLine();
strLower = strUpper.toUpperCase();
System.out.print("String in Upper case = " +strLower);
}
}