Cartesian product task ?
Generating a Cartesian product can often be seen arising as a component of solutions to Rosetta Code tasks, but I can't immediately see a task in which the generation of Cartesian products (two lists or n-ary) is explicitly focal.
The Java code doesn't work?
It returns a nested list of an incomplete product?
Is written in Python, but is in no way Pythonic and should not be used over the idiomatic itertools.product solution.