I have a hashmap like this:
HashMap<String, String[]> map = new HashMap<String, String[]>();
I want to convert this to an array, say Temp[], containing as first value the key from the hashmap and as second the String[]-array from the map, also as array. Is this possible? How?
See same question here:
hashMap.keySet().toArray(); // returns an array of keys
hashMap.values().toArray(); // returns an array of values
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