List of usage examples for java.util Arrays asList
@SafeVarargs @SuppressWarnings("varargs") public static <T> List<T> asList(T... a)
From source file:Main.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); System.out.println(list.indexOf("A")); }
From source file:Main.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); System.out.println(list.size()); System.out.println(list.isEmpty()); }
From source file:Main.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); List list1 = Arrays.asList(new String[] { "A", "B", "C", "D" }); System.out.println(list1.containsAll(list)); }
From source file:Main.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); System.out.println(list.size()); System.out.println(list.hashCode()); }
From source file:MainClass.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); System.out.println(list.lastIndexOf("A")); }
From source file:MainClass.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); System.out.println(list.contains("C")); }
From source file:MainClass.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); List list2 = Arrays.asList(new String[] { "B", "A" }); System.out.println(list.contains(list2)); }
From source file:MainClass.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); list.set(2, "X"); System.out.println(list);/* w w w .j a v a2s .c o m*/ }
From source file:Main.java
public static void main(String[] a) { List<String> list = Arrays.asList(new String[] { "A", "B", "C", "D" }); list.set(2, "X"); System.out.println(list);// w ww . j a v a 2 s .com }
From source file:MainClass.java
public static void main(String[] a) { List list = Arrays.asList(new String[] { "A", "B", "C", "D" }); List list2 = Arrays.asList(new String[] { "A", "B", "C" }); System.out.println(list.equals(list2)); }