programming-examples/java/_Basics/create list using an Array in java.java
2019-11-15 12:59:38 +01:00

17 lines
430 B
Java

package com.c4learn;
import java.util.Arrays;
import java.util.List;
public class ArrayDemo1 {
public static void main (String args[]) {
// Create an array of strings
String arr[] = new String[]{"A","B","C","D"};
List list1 = Arrays.asList(arr);
// Print the list
System.out.println("Value of Array :" + list1);
}
}