CONVERT UPPERCASE TO LOWERCASE AND LOWERCASE TO UPPERCASE

This is the programe we can convert the strings from uppercase to lowercase and viceversa.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.io.*;
import java.lang.*;
public class UpperToLower
{
     public static void main(String args[]) throws IOException
     {
        BufferedReader buff =  new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter the string:");
        String s = buff.readLine();
        String upper = s.toUpperCase();
            String lower = s.toLowerCase();
        System.out.println("UPPER STRING:"+upper);
        System.out.println("LOWER STRING:"+lower);
     }
}

Output :Case Conversion

gcdn