3:29 pm - Saturday June 21, 7608

StringBuilder Example Program for length()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
*@author :CandidJava.com
*@descriptions : This program explain the function and use of  length().
It is used to find length of the string .
*/
import java.lang.*;
public class StrBuilderlength
{
public static void main(String args[])
{
StringBuilder sb=new StringBuilder("welcome");//To create object for StringBuilder class
int l=sb.length();//to find lentgh of the string
System.out.println("Length="+l);
}
}

OUTPUT:

Length=7

BACK

Filed in: Z-A All Java Codes

Comments are closed.