In java, basically these two conversions are so common and popular...
Array to List
List<String> list = Arrays.asList(array);List to Array
String[] array = list.toArray(new String[list.size()]);
So the question is, which is faster, Array to List or its reverse?
Now, Why am I asking this question? Because I've to implement a method in which an array or a list, both can be passed in parameter. I just have to iterate this list and that's all. So here I have to decide that what should I convert? array to list or list to array!