public class LengthExample
{
public static void main(String args[])
{
String s1="My name is Sukhvir";
String s2="I am working in GGI Khanna";
System.out.println("First String is = " + s1);
System.out.println("Length of the String is = "+s1.length());
System.out.println("Second String is = " + s2);
System.out.println("Length of the String is = "+s2.length());
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.