import java.util.*; import java.util.ArrayList; import java.util.List; public class Main { public static volatile String uuu = null; public static volatile List<String[]> _rowList = new ArrayList<String[]>(); public static void main(String[] args) { _rowList.add(new String[]{"1§", "2", "3"}); _rowList.add(new String[]{"1M", "2Met"}); _rowList.add(new String[]{"1§", "2", "3S"}); _rowList.add(new String[]{"1äöä", "2", "3S"}); _rowList.add(new String[]{"1äöä", "", "3S"}); _rowList.remove(0); _rowList.remove(0); _rowList.remove(0); _rowList.remove(0); for (String[] row : _rowList) { System.out.println("Row = " + Arrays.toString(row)); } // prints: // Row = [1, 2, 3] // Row = [4, 5, 6] // Row = [7, 8] System.out.println(_rowList.get(0)[2]); // prints "3S" System.out.println(_rowList.isEmpty()); // prints "false" } } |