Showing posts with label lower case. Show all posts
Showing posts with label lower case. Show all posts

Saturday, 15 June 2013

use of java string funtion lowercase OR use of toLowercase()

/*change case to lower case*/
import java.io.*;

public class lowercase
{
    public static void main(String []args)
    {
        String str,str_2;
        try
        {
            DataInputStream cin=new DataInputStream(System.in);
            System.out.println("Enter any String ");
            str=cin.readLine();
            System.out.println("Your entered string is = "+str);
            str_2=str.toLowerCase();
            System.out.println(str_2);
        }
        catch(Exception e)
        {
            System.out.println(e);
        }
    }
}