title: How can i return arrays?
body: <p>First, how can I return an array, and second I dont understand the .class expected.  I have questions posted in the code comments:</p>
  
  <pre><code>public static int[] histograma(int[] notas, int[] histo) {
      int cont = 0;
      for (int j = 0; j &lt;= 11; j++) {
          for (int i = 0; i &lt; notas.length; i++) {
              if (j == notas[i]) {
                  cont++;
              } else
                  System.out.print("");
              histo[j] = cont; //Can i call a array like this?
          }
      }
      return histo[]; //i want to k how can i return a array and here say .class   expectd
  
  }
  </code></pre>
  
  <hr>
  
  <p>Since this question has not been received very well by the community i need to ask another thing and i can only by re-edit:</p>
  
  <p>I have <code>histo[]={1,4,5,6,8}</code>.</p>
  
  <p>how can i make <code>System.out.print("*")</code> repeat first <code>histo[0]</code> times, <code>histo[1]</code> times ,... , <code>histo[4]</code> times all at once?</p>