Q:

List of Lists of Lists

I'm new to Java and I need to make a list of lists of lists.  I could do it in python because an element of a list can be a list so in an embedded list list[0] would refer to a list and list[0][0] would refer to the zeroeth element of the embedded list.  Is there any easy way to implement this behavior in java? 

A:

All the other answers are technically correct, but IMHO if you implement a rough List of Lists of Lists you are not treating your data at the right level of abstraction.  For example I am pretty sure that a List of Lists already means "something" in your business domain.  Encapsulate this "something" in another object so you can just have a List<Something> instead of a difficult to use and maintain List<List<List<Object>>>. 

A:

As Mario says, you probably need to abstract out your data a little further.   But, the following will do what you need. 
In Java you would so something like:
List<List<List<Object>>> listOfListsOfLists =new ArrayList<List<List<Object>>>();

Then to access the items, you would use:
listOfListsOfLists.get(a).get(b).get(c);

Or, to iterate over everything:
for (List<List<Object>> list2: listOfListsOfLists) {
    for (List<Object> list1: list2) {
        for (Object o: list1) {
            // use `o`
        }
    }
}

A:

Since all of these answers make me barf, can I just add the suggestion that you either

Create a data type to express your data while encapsulating the details of the structure, or at least
Create a key type that wraps an int[] (but overrides equals and hashCode properly) and use a HashMap instead?   It's typically rare that your whole 3-dimensional structure will be filled up much anyway.   

Even better you could encapsulate that map and use varargs for clean access.   
public class NDimensionalArray<V> {
    private final int dimensions;
    private final Map<Key, V> values = new HashMap<Key, V>();

    private NDimensionalArray(int dimensions) {
        this.dimensions = dimensions;
    }

    public V get(int... indices) {
        checkIndices(indices);
        return values.get(new Key(indices));
    }

    public void set(V value, int... indices) {
        checkIndices(indices);
        values.put(new Key(indices), value);
    }

    private void checkIndices(int[] indices) {
        if ( indices.length ! = dimensions ) {
            throw new IllegalArgumentException();
        }
    }

    private static final class Key {
        private final int[] indices;

        private Key(int[] indices) {
            this.indices = indices;
        }

        @Override
        public int hashCode() {
            return Arrays.hashCode(indices);
        }

        @Override
        public boolean equals(Object obj) {
            return Arrays.equals(indices, ((Key)obj).indices);
        }
    }
}

If people have examples of established collections libraries that already do this sort of thing, let me know and I'll add links.