Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.io.*;
  2.  
  3. public class StringBufferSample {
  4.  
  5. public static void main(String[] args) throws IOException {
  6. Character[] rapCharArray = new Character[5];
  7.  
  8. rapCharArray[0] = new Character('a');
  9. rapCharArray[1] = new Character('b');
  10. rapCharArray[2] = new Character('c');
  11. rapCharArray[3] = new Character('d');
  12. rapCharArray[4] = new Character('e');
  13.  
  14. StringBuffer sb = new StringBuffer();
  15. for ( int i = 0; i < rapCharArray.length; i++ ) {
  16. sb.append(rapCharArray[i]);
  17. }
  18. System.out.println(sb);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement