How to append to an array that contains blank spaces - Java

Posted by Cameron Townley on Stack Overflow See other posts from Stack Overflow or by Cameron Townley
Published on 2012-07-07T03:12:53Z Indexed on 2012/07/07 3:15 UTC
Read the original article Hit count: 148

Filed under:
|

I'm trying to append to a char[] array that contains blank spaces on the end. The char array for example contains the characters 'aaa'. When I append the first time the method functions properly and outputs 'aaabbb'. The initial capacity of the array is set to 80 or multiples of 80. The second time I try and append my output looks like"aaabbb bbb". Any psuedocode would be great.

© Stack Overflow or respective owner

Related posts about java

Related posts about append