FallenG's Profile User Rating: -----

Reputation: 22 Tradesman
Group:
Members
Active Posts:
44 (0.05 per day)
Joined:
12-January 13
Profile Views:
398
Last Active:
User is offline May 15 2013 06:14 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   FallenG has not set their status

Posts I've Made

  1. In Topic: Methods, Arrays, and Loops - Oh My! Lottery question in Java.

    Posted 3 Apr 2013

    If you generate the letters independently of each other, there is no guarantee they won't be repeats. What would happen if the five winners were all A, and the five losers were also all A?

    Since you used the word 'set' in your description, and if it isn't too much a change of direction, I would suggest using a Java Set to hold your winners and losers.

    // Create set of A-Z
    // Remove 5 random elements and place into Set `winners`
    // Remove 5 random elements and place into Set `losers`
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Programming Languages:
C, C++, Java, Scala, Haskell, Web dev

Contact Information

E-mail:
Private

Friends

FallenG hasn't added any friends yet.

Comments

FallenG has no profile comments yet. Why not say hello?