How can I find Histogram using arrays?
<p>Build/Output Histograms using Arrays Where i'm wrong?</p>

<p>This code takes 5 inputs from user in array and show the number of stars for example if user enter 3 then *** would be shown and so on .Where i'm wrong ?</p>

<pre><code>  public class P20 {
  public static void main(String[] args) {

   int[] anArray;
   int Number;
//setup variable value
   anArray = new int [10];
   System.out.println("Enter some numbers between 1 and 100.");

  for (int i = 0; i &lt; 10; i++) {
    System.out.println(i);

   anArray[0] = 1-9;
   anArray[1] = 10-19;
   anArray[2] = 20-29;
   anArray[3] = 30-39;
   anArray[4] = 40-49;
   anArray[5] = 50-59;
   anArray[6] = 60-69;
   anArray[7] = 70-79;
   anArray[8] = 80-89;
   anArray[9] = 90-100;
   if(anArray &gt; 0) {
  System.out.println("*"+Number );   

  else if(anArray &gt; 20) 
  {
   System.out.println("**"+Number ); 
  }
  else if (anArray &gt; 30) 
  {
   System.out.println("***"+Number ); 
  }    
  else if (anArray &gt; 40) 
  {
   System.out.println("****"+Number ); 
  }            
  else if (anArray &gt; 50) 
  {
  System.out.println("*****"+Number ); } 
 }}
</code></pre>