In this section, you will learn to convert an Array to List.
Code Description:
This program helps you in converting an Array to List. Here we have taken an array of data which gets converted to List using Array.asList mathod. We have also used collection.sort method to get the data in sorted order.
import java.util.Arrays;
|
Output of the program:
|
C:\unique>javac ArrToList.java
C:\unique>java ArrToList |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Convert Array to List View All Comments
Post your Comment