You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
430 B
Java
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);
|
|
}
|
|
} |