Tuesday , December 6 2016
Home / Blue J / Java program to change lower case to upper case and vice versa

Java program to change lower case to upper case and vice versa

This is a program to alter the case of all characters in a string given as a input. So small letter becomes capital and vice-versa, no change to other symbols or numbers is made. Thus upper case changes to lower case and lower to upper.

Example:- HellO WoRlD

OUTPUT:- hELLo wOrLd

 

OUTPUT:

program to change lower case to upper case and vice versa

Tags: change character case , program to change lower case to upper case and vice versa

Also See:   JAVA program to calculate digit sum of an integer

Check Also

Program for Matrix Multiplication in JAVA

Matrix Multiplication:– Here is given a Java Program for Matrix Multiplication also call matrix product. In ...

4 comments

  1. Thank you for this. A similar question was asked to me in a labtest. The only difference was to print out numbers as well. for example if the input was: AbCd123 , output should be: aBcD123
    How can I print out the numbers as well?

  2. how can we change only the first letter to uppercase and the others to lowercase
    Eg:jJACK IS A DuLl bOy = input
    :Jack Is A Dull Boy

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.