2:51 am - Tuesday April 23, 2019

StringBuilder Example Program for append(double d)

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 append(double d)
Which converts double value as string and appends with given string
*/
public class StrBuilderAppendDouble
{
public static void main(String arg[])throws Exception
{
StringBuilder sb=new StringBuilder("welcome");//to create object for StringBuilder class
sb.append(5.056D);//to append Double value as String
System.out.println(sb);
}
}

OUTPUT:

welcome5.056

BACK

Filed in: Z-A All Java Codes

Comments are closed.