List to Array Java

Here, toArray() method of Collections interface is used. This method returns an Object array containing the elements of collection class. Example on on "List to Array Java" explains the usage of toArray() method to convert List to array. import java.util.*; public class ListConvertArray { public static void main(String args[]) { // CREATING LIST, ADDING ELEMENTS …

List to Array Java Read More »