I have a list that contains further sub lists and i have objects stored in the sub list. I want to generate all possible combinations of all elements.
e.g. we have a list that contains two list L1,L2 and all have different objects stored in the for example L1 contains {obj1,obj2} L2 contains {obj3,obj4}
then the result should come in the form of
{obj1,obj3}
{obj1,obj4}
{obj2,obj3}
{obj2,obj4}
all lists are being generated dynamically. so the solution should be generic irrespective of count of elements in main list and sub list