yadin michaeliPro Student 5,422 Points
fact = randomNumber im a little confused
Hi everyone...im a little confused about this line of code: fact = randomNumber
does it mean that we set fact variable to randomNumber variable?
please explain that to me
Evan Demaris64,249 Points
Yes, that code indicates that we're assigning the
fact variable to equal the random number generated by the
randomNumber variable. We then concatenate the number with an empty string to coerce the number into a string without explicitly casting it as such, because
fact is a String then assigned to a TextView.
Specifically, it's then assigned to
mFactTextView to display that number.
mFactTextView tells you that you have correctly gone from one random number to another as you click the
Hope that helps!