Converting your Java strings of text to upper or lower case. Just use the inbuilt methods toUpperCase and toLowerCase.
WAP to change string upper and lower case.
class cases{
public static void main(String args[])
{
String s=" maninder";
System.out.println(s.toUpperCase());
String s1=" MANINDER";
System.out.println(s1.toLowerCase());
}
}
Output of the program:
WAP to change string upper and lower case.
class cases{
public static void main(String args[])
{
String s=" maninder";
System.out.println(s.toUpperCase());
String s1=" MANINDER";
System.out.println(s1.toLowerCase());
}
}
Output of the program:
No comments:
Post a Comment