title: How to insert vector element inside vector in java
body: <p>I have a two set of vector and I need to insert second set in each of the first set element and print.</p>
  
  <p>my input is like : <code>{RED,BLUE,GREEN},{CSK,MI,RCB}</code></p>
  
  <p>my output is like : <code>{RED,CSK},{RED,MI},{RED,RCB},{BLUE,CSK},{BLUE,MI},{BLUE,RCB},{Green,CSK},{Green,MI},{Green,CSK}</code></p>
  
  <p>I tried my code like this. Can you please suggest the way</p>
  
  <pre><code>public static void main(String[]args){
  Vector v = new Vector();
  v.addElement("RED");
  v.addElement("BLUE");
  v.addElement("GREEN"");
  Vector v2 = new Vector();
  Vector v3 = new Vector();
  v2.addElement("CSK");
  v2.addElement("RCB");
  v2.addElement("MI");
  for(int i=0; i&lt;v.size(); i++){
      for(int j=0; j&lt;v2.length; j++){
       v3 = v(i).add(v2(j));
      }
  }
  for(int i=0; i&lt;v3.size(); i++){
      System.out.println(v3);
  }
  }
  </code></pre>