Bar chart not functioning the way I would want it
<p>I was hoping if you can help me with this coding. I'm attempting to create a bar chart but it doesn't seem to be going my. I m trying to make the output below but when I run it I get <code>[Red, Yellow, Blue](0)</code> repeating. I feel like I'm close to solving this. If someone can push me in the right direction in what I can do it would be appreciated greatly.</p>

<pre><code>import java.util.HashSet;
import java.util.Arrays;
import java.util.Set;
public class Test {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        //These arrays are not to be modified and should only use these 2 arrays.
        short[] points ={1,2,1,1,1,1,1,1,3,4,1,5};
        String[] teams ={"Red","Yellow","Blue","Blue","Blue","Red","Yellow","Red","Yellow","Red","Blue","Blue"};
        Set&lt;String&gt; uniqueTeams = new HashSet&lt;String&gt;(Arrays.asList(teams));
        Barchart(points, teams, uniqueTeams);
    }

    public static void Barchart(short[] points, String[] teams, Set&lt;String&gt; uniqueTeams){
        byte count=0;
        for(int index=0; index &lt; points.length; index++){
            if(teams.equals(uniqueTeams)){
                count++;
            }
        }
        for(int index=0; index &lt; points.length; index++){
            System.out.println(uniqueTeams + "("+ count + ")");
        }

    }
}

//Output should look like this:
//
//Red(7): *******
//
//Yellow(6): ******
//
//Blue(9): *********
</code></pre>

<p>I have a idea of how to do it another way but I don't know how. If someone can answer this question below.
How would I be able to get or create a new array without having doubles of what I do in the teams array? So the array would look like String[] uniqueTeams = {"Red, "Yellow", "Blue"}; but not initialize or declare it but create a way to make the program create itself if that makes sense.</p>
