import java.io.*;
public class length_function
{
public static void main(String []args)
{
String str;
try
{
DataInputStream cin=new DataInputStream(System.in);
System.out.println("Enter first String ");
str=cin.readLine();
int i=str.length();
System.out.println("length of given string is : "+i);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
public class length_function
{
public static void main(String []args)
{
String str;
try
{
DataInputStream cin=new DataInputStream(System.in);
System.out.println("Enter first String ");
str=cin.readLine();
int i=str.length();
System.out.println("length of given string is : "+i);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
No comments:
Post a Comment