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.


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

Results 1 to 2 of 2

Thread: JAVA Arrays for Bingo game

  1. #1
    Junior Member
    Join Date
    Aug 2014
    Thanked 0 Times in 0 Posts

    Default JAVA Arrays for Bingo game


    I am writing a Bingo program for a class and have reached a roadblock. How do I call 5 numbers from the array and where do I store them so I can populate them back into my JLabels on the Bingo card. I'm sure there are more complicated ways to do this, but I'd like to keep it simple so I actually understand the process. I understand that I will need to shuffle the numbers in the array before choosing them, but I also am not sure how to do that. You're help is greatly appreciated!

    int [] BArray = {1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
    for (int index = 0; index > 5; index++)


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 698 Times in 680 Posts

    Default Re: JAVA Arrays for Bingo game

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    Choosing the numbers 1 - 15 from a 'shuffled' array could be randomly choosing numbers 1 - 15, inclusive.

Similar Threads

  1. Code guessing game, need help with arrays
    By Warow in forum What's Wrong With My Code?
    Replies: 7
    Last Post: November 17th, 2013, 02:59 AM
  2. Help with Arrays (Java card game)
    By tonynsx in forum What's Wrong With My Code?
    Replies: 7
    Last Post: November 8th, 2013, 04:49 PM
  3. bingo ticket loop problem (doesn't compile like it should...)
    By mv740 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: November 14th, 2011, 04:21 PM
  4. Dice Game help and Arrays
    By SnarkKnuckle in forum What's Wrong With My Code?
    Replies: 5
    Last Post: March 9th, 2011, 10:08 PM
  5. Help outputing to txt file (BINGO GAME)
    By Chris in forum What's Wrong With My Code?
    Replies: 0
    Last Post: June 23rd, 2010, 09:10 PM

Tags for this Thread