char ret[] = {};
Doesn't work seem to work and I'm not sure what the best way to do this is.
Any help would be greatly appreciated.
Arrays must have a fixed length.
If your goal is to have a dynamically expansible list, consider a List
instead. Everytime you add an item by add()
method, it will grow dynamically whenever needed.
List<Character> chars = new ArrayList<Character>();
// ...
You're probably looking for an ArrayList<Character>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With