HashMultimap return a set of values for a given key.how do i convert this java set to a sorted array? Is there a way other than converting it into a sorted list using java.util.collections.sort(....) and then using a to array?
Two lines:
Object[] array = set.toArray();
Arrays.sort(array);
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