Here you can find the source of print(ArrayList
static public void print(ArrayList<String> lines, int targetColumn)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { static public void print(ArrayList<String> lines, int targetColumn) { for (String line : lines) { if (targetColumn >= 0) System.out.println(line.split(",")[targetColumn]); else/*from ww w. j ava 2 s .c o m*/ System.out.println(line); } } }