• Post Reply Bookmark Topic Watch Topic
  • New Topic

find a randomly generated number  RSS feed

 
Manikantha Maddila
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have got an assignment,which is to find a randomly generated number from 1 to 10 lakhs(range).
i didn't get the logic
Can you people please post the java program to find the random number which is in the range of 1 to 10 lakhs.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Take a look at class java.util.Random. It contains a method that you can use to do this.

Please try it out for yourself. If you still can't figure it out, post here what you've tried and we can point you in the right direction.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!