title: Algorithm for generating variations based on different sets containing different values
body: <p>In short I am looking for a way in Java/C# for generation of all possible variations based on different sets containing different values. 
  For example:
  Lets say we have set of names:</p>
  
  <pre><code> -Max, Jack, Roger
  </code></pre>
  
  <p>Second set of verbs</p>
  
  <pre><code>-Loves, hates, knows
  </code></pre>
  
  <p>And third set of programming languages just as an example but we may have 10 sets</p>
  
  <pre><code>-Java, C#, Python, Visual Basic, C++
  </code></pre>
  
  <p>What I want is a way to generate all possible variations containing ALL attributes and having all values for example an output should be :</p>
  
  <pre><code>Max loves Java
  Jack loves Java
  Roger loves Java
  Max hates Java
  Jack hates Java
  Roger hates Java
  Max knows Java
  Jack knows Java
  Roger knows Java
  Max loves C#
  Jack loves C# 
  Roger loves C#
  and so on... this will generate 45 variations if I am not wrong at the end
  </code></pre>
  
  <p>Can anyone help ?
  I believe a similar easier example will be if you want to generate a variations of products in some clothing shop which have different sizes, colors and materials for example and you want all variations.</p>