Java examples for Collection Framework:Array Element
print Array
public class Main { public static void printArray(int a[]) { for (int x : a) { System.out.print(x + ","); }// ww w .j a v a2 s.c o m System.out.println(""); } public static <T> void printArray(T coll[]) { for (T i : coll) { System.out.print(i + ","); } System.out.println(""); } }