Java #26: How to Use The StringBuilder Function

//Programmer:Akinwale Owi
//Company:Dagba Computers
//Program Purpose:How to use the StringBuilder Function

package dagba.samples;

/**
*
* @author Akin
*/
public class DagbaSamples {

/**
* @param args the command line arguments
*/

public static void main(String[] args)
{
//Building the fast half of the String Builder
StringBuilder name = new StringBuilder(“Reed”);

//printing the first half to test
System.out.println(name);

//Using append to add to name
name.append(” Richards”);

//printing out the new result of name
System.out.println(“My name is “+name);

}//end of main

}//end of public Dagba Class

Leave a comment