Conversion of collection to int array

collections, java

Solution

Assuming the values are of type `Integer`, you can try this:

Collection c = Sort.values();
Integer[] a = (Integer[])(c.toArray(new Integer[c.size()]));

Problem

I want to display a graph and for displaying that i need integer values.I get this from my code ``` Collection c = Sort.values(); ``` Is there any way that i convert collection in such a way that i get integer values?i get this when i print the collection c ``` [64770, 26529, 13028, 848, 752, 496] ```

Original source