Thursday, 13 June 2013

Length Function

LENGTH():   length() is used to find the length of a string


// To print the string and its length.

class Length
{
public static void main(String arr[])
{
String s="getcoderesults.com";                   //For declare String literals
System.out.println(s);
System.out.println(s.length());

}}



Output:



This entry was posted in :

0 comments:

Post a Comment