Android Build a Simple Android App with Java Basic Android Programming Using the Random Class

how to convert a random number4

how to add int as string variable

RandomTest.java
Random randomGenerator= new Random();
int randomNumber=randomGenerator.nextInt(10);
Stringfact=randomNumberInt+"";

1 Answer

Raffael Dettling
Raffael Dettling
31,040 Points

You named the new variable wrong and forgot to give it the type string

-

- HINT

String intAsString = randomNumber + "";