parse « StringBuffer « Java Data Type Q&A

1. parse StringBuffer

Im trying to run through a String Buffer char by char. while (sb.length() > i) { System.out.print(sb.charAt(i)); } It works fine if the sb DO NOT CONTAIN doubble or more new lines (two '\n'). Every char after the '\n's will not be printed out. Dose anyone know why, or dose anyone have a-work-around to parse through the sb and still being ...

2. Need to parse StringBuffer

I have a values filled in ArrayList and also appending some elements inside the StringBuffer ArrayList list = new ArrayList(); StringBuffer sb = new StringBuffer(); list.add("NUMBER"); list.add("NUMBER"); list.add("VARCHAR2"); list.add("VARCHAR2"); list.add("NUMBER"); for(int i=0;i

3. Need help in parsing the Stringbuffer

4. Parsing a StringBuffer