Arrays: asList(T[] a) : Arrays « java.util « Java by API






Arrays: asList(T[] a)

   
/*
 Output:


a
b
c


 * */

import java.util.*;
public class MainClass {
  public static void main (String args[]) {

    String[] a = new String[]{"a","b","c"};
    List list = Arrays.asList(a);

    Iterator i = list.iterator();
    while (i.hasNext()) {
      System.out.println(i.next());
    }
  }
}
           
         
    
    
  








Related examples in the same category

1.Arrays: binarySearch(int[] a,int key)
2.Arrays: binarySearch(Object[] a, Object key)
3.Arrays: copyOf(String[] original, int newLength)
4.Arrays: copyOfRange(String[] original, int from, int to)
5.Arrays: deepToString(Object[] a)
6.Arrays: equals(boolean[] a, boolean[] a2)
7.Arrays: equals(char[] a, char[] a2)
8.Arrays: equals(double[] a, double[] a2)
9.Arrays: equals(float[] a, float[] a2)
10.Arrays: equals(int[] a, int[] a2)
11.Arrays: equals(long[] a, long[] a2)
12.Arrays: equals(Object[] a, Object[] a2)
13.Arrays: equals(short[] a, short[] a2)
14.Arrays: fill(boolean[] a, boolean val)
15.Arrays: fill(boolean[] a, int fromIndex, int toIndex, boolean val)
16.Arrays: fill(byte[] a, byte val)
17.Arrays: fill(byte[] a, int fromIndex, int toIndex, byte val)
18.Arrays: fill(char[] a, char val)
19.Arrays: fill(char[] a, int fromIndex, int toIndex, char val)
20.Arrays: fill(double[] a, double val)
21.Arrays: fill(double[] a, int fromIndex, int toIndex, double val)
22.Arrays: fill(float[] a, float val)
23.Arrays: fill(float[] a, int fromIndex, int toIndex, float val)
24.Arrays: fill(int[] a, int val)
25.Arrays: fill(long[] a, long val)
26.Arrays: fill(long[] a, int fromIndex, int toIndex, long val)
27.Arrays: fill(Object[] a, Object val)
28.Arrays: fill(int[] a,int fromIndex,int toIndex,int val)
29.Arrays: fill(Object[] a, int fromIndex, int toIndex, Object val)
30.Arrays: fill(short[] a, short val)
31.Arrays: fill(short[] a, int fromIndex, int toIndex, short val)
32.Arrays: sort(byte[] a)
33.Arrays: sort(byte[] a, int fromIndex, int toIndex)
34.Arrays: sort(char[] a)
35.Arrays: sort(char[] a, int fromIndex, int toIndex)
36.Arrays: sort(double[] a)
37.Arrays: sort(double[] a, int fromIndex, int toIndex)
38.Arrays: sort(float[] a)
39.Arrays: sort(float[] a, int fromIndex, int toIndex)
40.Arrays: sort(in[] a)
41.Arrays: sort(T[] a, Comparator c)
42.Arrays: toString(Object[] a)