Java String toLowerCase Example
String class toLowerCase method example
String class toLowerCase method example. This example shows you how to use toLowerCase method.This method Converts all of the characters in this String to lower case using the rules of the default locale
Here is the code:-
/**
* @(#) Lowercasestring.java
*Program Shows a class representing the Conversion of the String into Lower
* @Version 01-May-2008
* @author Rose India Team
*/
class Lowercasestring
{
public static void main(String[] args)
{
// Declaration of String
String s=" Welcome to Rose India.net";
// Converts all of the characters in this String to Lower case
String s1=s.toLowerCase();
//Displays the Actual String declared above
System.out.println("Actual String="+s);
System.out.println("");
//Displays the Actual String declared above into Lower Case
System.out.println("String in Lower Case is ="+s1);
}
} |
-
|