Hi Everyone,
I'm having this problem on data type conversion between a map and a
string array and outputting the result.
What I expect for the output is the manner at which I add it to the map.
My expected output was "one", "two","three","four"..."eight" and this is the sequential way on how I add the object to the map.
But when i ran the code, the output gets jammed "eight", "five","four","one"...."two".
By the way, I did some
test and change the collection type from a Map to an ArrayList. I then perform String array conversion, and the output was the manner how I add it to the arraylist. But I dont need an arraylist but a map. I'm wondering whats the difference between a map and arraylist conversion to string array?
Is there a way for me to have my output be synchronized in the manner I inserted it my collection
(map)? I'm running in circles thinking of possible ways on how to execute this. Need some advice. Thanks to all ranchers..