Java List To Collections

[Solved] Java List To Collections | Java - Code Explorer | yomemimo.com
Question : java collection to list

Answered by : awful-anaconda-47p94neycfv7

List theList = new ArrayList(coll);

Source : https://stackoverflow.com/questions/580160/how-to-convert-a-collection-to-list | Last Update : Wed, 13 Jan 21

Question : java list to collections

Answered by : sefa-swotqsl3nqgh

//List <T> already implements Collection<T>
//why would you need to create a new one ?
Collection<T> collection = myList;

Source : https://stackoverflow.com/questions/2476732/cast-a-list-to-a-collection | Last Update : Sat, 19 Mar 22

Answers related to java list to collections

Code Explorer Popular Question For Java