This discussion is archived
13 Replies Latest reply: Dec 24, 2008 12:40 AM by 843785 RSS

initialization of a stringbuffer

843785 Newbie
Currently Being Moderated
I would like to know if it is possible in the code below to initialize "feedback" to a number of '_' equal to the length of "code". Is there anything in a string api that would allow me to do this?
public class stringTest
     StringBuffer feedback; // replace this example variable with your own
String code="alicja";;

     * Default constructor for objects of class stringTest
     public stringTest()
     feedback=new StringBuffer(code);