title: random number generator
body: <p>I m trying to make a random number generator in android. My code has to start generating numbers in sets of 3 after clicking the "generate" button. So far i've coded a generator that can produce finite sets of 3 numbers each. What i want to create is a dynamic generator that keeps generating numbers.CODE:
  `</p>
  
  <pre><code>public class Plot2Activity extends Activity {  
   /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
  
     final Random myRandom = new Random();
  
     Button buttonGenerate = (Button)findViewById(R.id.generate);
     final TextView textGenerateNumber = (TextView)findViewById(R.id.generatenumber);
  
     buttonGenerate.setOnClickListener(new OnClickListener(){
  
    @Override
     public void onClick(View v) {
      // TODO Auto-generated method stub
     ArrayList&lt;Object&gt; Arry1 = new ArrayList&lt;Object&gt;();
      for(int i=0;i&lt;5;i++){
     ArrayList&lt;Integer&gt; Arry = new ArrayList&lt;Integer&gt;();
     for(int k=0;k&lt;3;k++){
         Arry.add(myRandom.nextInt(100));
     }
         Arry1.add(Arry);
     }
         textGenerateNumber.setText(String.valueOf(Arry1));
         }
         });  
      }
   }
  </code></pre>