Android Code - Radom number generation for calling activity
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/363681/generating-random-number-in-a-range-with-java">Generating random number in a range with Java</a><br>
  <a href="http://stackoverflow.com/questions/6029495/how-can-i-generate-random-number-in-specific-range-in-android">How can I generate random number in specific range in Android?</a>  </p>
</blockquote>



<p>Here is my scenario
From the Mainactivity ; On click of a Button i want to generate a random number from 1 to 4
Based on the output, i want to write an if-else that will call 4 different activities</p>

<p>So on click, if 4 is generated, then call activity 4
Next time 1 can be generated and should call activity 1
and so on ....</p>

<p>Can someone please help me with this code?</p>
