title: android java array of paint
body: <p>i am making a game and i trying to make bitmaps dissapear or appear anyway for some reason when i use paint as 1 object it works but when i add a array paint(fro each bitmap) it crashes
  here is the lines i used with it:</p>
  
  <pre><code>//in MainActivity class
  Paint[] paintanswer;
  //in oncreate
  paintanswer=new Paint[answerlength];
  
  //in the draw func
  for(int i=0;i&lt;answerlength;i++){
                  paintanswer[i].setAlpha(answeralpha[i]);
                  canvas.drawBitmap(answerbitmapscaled[i],(float) (((cwidth/2)-((answerlength*answersize)/4)-answersize/4)+i*(answersize/2)),(float) (cwidth/2), paintanswer[i]);   
  </code></pre>
  
  <p>the answer length is the length i get from other activity accordingly i set the array</p>