Here you can find the source of print(ArrayList
public static void print(ArrayList<String> tokens, String symbol)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static void print(ArrayList<String> tokens, String symbol) { for (int i = 0; i < tokens.size(); i++) { System.out.print(tokens.get(i) + symbol); }/*from www . j a v a2s .c om*/ System.out.print("\n"); } public static void print(String[] files) { for (int i = 0; i < files.length; i++) { System.out.print(files[i] + " "); } System.out.print("\n"); } public static void print(int[] c1) { for (int i = 0; i < c1.length; i++) { System.out.print(c1[i] + " "); } System.out.println(); } public static void print(double[] p_topic, String prefix, String midd, String fedix) { System.out.print(prefix); for (int i = 0; i < p_topic.length; i++) { System.out.print(p_topic[i] + midd); } System.out.print(fedix); } }