import java.io.*;
class StrUpper
{
public static void main(String args[])
{
int i;
System.out.println("Enter the Sring:");
DataInputStream d=new DataInputStream(System.in);
try
{
String str=d.readLine();
String uper=str.toUpperCase();
System.out.println(uper);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Output:
class StrUpper
{
public static void main(String args[])
{
int i;
System.out.println("Enter the Sring:");
DataInputStream d=new DataInputStream(System.in);
try
{
String str=d.readLine();
String uper=str.toUpperCase();
System.out.println(uper);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Output:
No comments:
Post a Comment