Q:

Android SDK help (java)

So I'm really not too great at programming, but I am reading and trying to change that, for the time being i need some help.  I have a simple app that will generate 7 random numbers 1-49 and place those 7 numbers in a text box.  I just need help with the for loop that does this, what i have so far is code/pseudo code.
String str = "";
for (int i = 0; i < 7; i++)

generate ... random code 
  array to keep track of random numbers generated so no collisions occur
  method call that goes through the array then keep looping
str += random + "_" ;
txtTextBox.settext(str);

A:

It will be something like this
String str = "";

Random rand = new Random();

for(int i=0; i<7; i++){
    str += (rand.nextInt(49) + 1) + " ";
}

txtTextBox.setText(str);

