0
I created a class that contains a method that generates a random number from 0 to 61... in my Fragment
I instituted within my event of button
... My question is, how do I put the amount of times it will generate for me. For example, I have a spinner
with the options 1,2,3 then I choose the 2, when clicking the button it has to generate for me:
1º = 25 2º= 50
all at the same time
How would I do it? Because if I create each method for the amount of times it becomes difficult, because imagine if the user wants it 100 times, there complicates. So how would I do that, I have no idea, someone could help me?
Code:
public void geraSix(){
MegaSenaController numberRandom = new MegaSenaController();
numberRandom.megaSena();
String groupFirst = numberRandom.getPrimary();
groupText.setText(groupFirst);
}
I did some things, but I couldn’t do the multiplication...
– Nathan
Multiplication? You refer to the creation of random numbers, right? You have tried to print the return of methods
megaSena()
andgetPrimary()
to see if they are correct? Try posting their code in your question as well.– Zulian