Advertisements

Write an application that inputs a line of text and output the text twice once in upper case and in lower case letters

import java.util.Scanner;
class e3
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String str;
System.out.println("Enter text ");
str=sc.nextLine();
String str1=str.toUpperCase();
String str2=str.toLowerCase();
System.out.println("UC = "+str1+"\nLC = "+str2);
}
}


MORE PROGRAMS