String Handling provides a lot of concepts that can be performed on a
string such as concatinating string, comparing string, substring etc.
// Simple program to print the length of character in a array
class A
{
public static void main(String arr[])
{
char ch[]={'a', 'b', 'c', 'd', 'e'};
String s1=new String(ch);
System.out.println(s1.length());
}
}
Output:
Tuesday, 11 June 2013
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment