FAQ

Java

JSP

Servlet


Advertisement



How to convert a given array to a list in Java?

The java.util.Arrays class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists. For example,

Long[]  nameIDs = { … … };
List nameIDList = Arrays.asList(nameIDs);


Printer-friendly version Printer-friendly version | Send this 
article to a friend Mail this to a friend

Previous Next vertical dots separating previous/next from contents/index/pdf Contents

  |   |