Radio button setId store and able to get between different Activity
<p>i start learning android programming. I create some radio button and at in the radio group. I search in this website, other programme said i can set the id to the radio button. How can i get it and is it able to store and get in different Activity because i want set them as the answer of the MCQ or survey! Thank a lot</p>

<pre><code>int id[] = new int[10];
RadioGroup AnswerRG = (RadioGroup) findViewById(R.id.AnswerRG);
AnswerRG.setOnCheckedChangeListener(this);
for(int i=0; i&lt;10; i++)
{
    rb1[i] = new RadioButton(this);
    AnswerRG.addView(rb1[i]);
    rb1[i].setText("Option " + i +":" );
    rb1[i].setId(id[i]);
}
public void onCheckedChanged(RadioGroup rg, int arg1)
{
    switch(arg1)
    {
    }
}
</code></pre>
