title: NullPointerexception being throwing when adding value into a vector
body: <p>I am trying to initialize a vector which has integers 1 to n in the form of strings for starters.</p>
  
  <p>This is my declaration for the vector.</p>
  
  <pre><code> Vector&lt;String&gt; candidatesSet,frequentItemSet,mFCandidatesSet,mFSet = new &lt;String&gt;Vector();
  </code></pre>
  
  <p>The loop i using to initialize is</p>
  
  <pre><code>for(int i=0; i&lt;crows; i++)
          {
             candidatesSet.add(Integer.toString(i+1));
          }
  </code></pre>
  
  <p>Here we get the value of variable crowsduring runtime.</p>
  
  <p>but it is throwing a NullpointerException in the line where i am adding strings to the objects.</p>
  
  <p>I tried intializing the vector to a null by </p>
  
  <pre><code> candidatesSet = null;
  </code></pre>
  
  <p>But it didnt work</p>