Generate all possible numbers which can be representated as the sum of 2 cubes below N
Except for error checking


Error checking would be nice, and can easily be done, so why not add it to the top of your method:

    if (n &lt; 0) {
        throw new IllegalArgumentException("number must not be negative");
    }



  what else can be improved?



your formatting, especially your spacing, which seems very random, and thus makes the code hard to read. Just use an IDE to fix this for you.
define variables in as small a scope as possible. For example, sum can be declared inside the loop as long sum = cubes.get(i);.
don't print in your method, but return the values instead. This makes the next point a lot easier, and makes your method reusable in general.
write unit tests to verify the functionality of your code, and to make it a lot easier to make changes without being afraid of breaking the code.