Java ArrayList Print print(ArrayList lines, int targetColumn)

Here you can find the source of print(ArrayList lines, int targetColumn)

Description

print

License

Open Source License

Declaration

static public void print(ArrayList<String> lines, int targetColumn) 

Method Source Code

//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);
        }
    }
}

Related

  1. print(ArrayList array)
  2. print(ArrayList tokens)
  3. print(ArrayList tokens)
  4. print(ArrayList l)
  5. print(ArrayList[] al)
  6. print(ArrayList tokens, String symbol)
  7. printArray(ArrayList array)
  8. printArrayArray(ArrayList> matrix)
  9. printArrayList(ArrayList arr)