#Hey, how can I encode an ArrayList of integers to a string, and how can I decode it?
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
u can check out #1062715379111178270
which is basically the same
i.e. array of ints to string
(and then to file)
as an example, u could have the array
int[] values = { 4, 2, 321, 0, 12 };
and make it a string like
"4,3,321,0,12"
by using a StringJoiner or joining-collector on streams
and decode it using split
Arrays.toString then decode using split