13 Replies Latest reply on Dec 24, 2008 8:40 AM by 843785

    initialization of a stringbuffer

      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);