Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Generating random numbers

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Generating random numbers

    Good day people,am struggling with a problem and i hope you can be of help.i want to generate 15 random interger numbers between 0-75,and none of the numbers once generated is repeated,e.g once 2,5,or 11 are generated by the subroutine or function they are not repeated again instead ,math.random() is called again to generate new intergers until new integers different from those generated are produced...hw do i do this,do i get a variable to save the generated numbers and check this value against a new generated number.
    i am developing this application for j2ME so icant work with vectors or arrays.thanks


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,166
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Generating random numbers

    See posts at Generating random numbers - Java Forums

Similar Threads

  1. Generation of random number using random class
    By JavaPF in forum Java SE API Tutorials
    Replies: 1
    Last Post: December 7th, 2011, 05:46 PM
  2. Java Question Need Help Restarting the Values of Variables from Random Numbers So Out
    By JavaStudent1990 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 24th, 2010, 02:25 PM
  3. Generating random letters and numbers together
    By newJava in forum Java Theory & Questions
    Replies: 3
    Last Post: March 19th, 2010, 04:08 AM
  4. help me .. about creating random numbers
    By soldier in forum Java Theory & Questions
    Replies: 2
    Last Post: December 20th, 2009, 08:24 PM
  5. Random numbers
    By Pooja Deshpande in forum Java SE APIs
    Replies: 8
    Last Post: June 5th, 2009, 04:36 AM

Tags for this Thread