Java Program to convert uppercase to lowercase and lowercase to uppercase…

This program will change the case of a given string. If a string is given then toUpperCase() function will convert it into upper case and toLowerCase() function will convert it into lower case.

class ChangeCase
public static void main(String args [])
String s = “This is a test.”;
System.out.println(“Original : ” + s);

String upper = s.toUpperCase();
String lower = s.toLowerCase();


Add Comment