Menu
Question Index
...

Write a program to convert the letters in a character array into another case. If input is 'a' make it 'A', if the input is 'M' make it 'm'. Do not use Character.toUpperCase or Character.toLowerCase.

Input(char Array) Output(char Array)
{'c', 'o', 'c', 'o', 'N', 'U', 'T'} {'C', 'O', 'C', 'O', 'n', 'u', 't'}
{'S', 't', 'U', 'd', 'E', 'n', 'T'} {'s', 'T', 'u', 'D', 'e', 'N', 't'}
{'A', 'N', 'D', 'H', 'R', 'A', 'p', 'r', 'a', 'd', 'e', 's', 'h'} {'a', 'n', 'd', 'h', 'r', 'a', 'P', 'R', 'A', 'D', 'E', 'S', 'H'}



class ConvertToAnotherCase
{
    public static void main(String s[])
    {
        char[] inputArray = {'a', 'Y', 'U', 'r', 'v', 'E', 'D', 'A', 'M'};
        char[] outputArray = convertToAnotherCase(inputArray);
        System.out.print("The character array is " );
        for(int i = 0; i < outputArray.length; i++ )
        {
            System.out.print(outputArray[i] + ", ");
        }

    }


    public static char[] convertToAnotherCase(char[] input)
    {
    }  

}

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App