title: Create A Method In Java
body: <p>Hello I am trying to create a method in Java that Accepts an integer from the user. Calculate and display how many occurences of the integer are in the array(i'm Creating a random array) as well as what percentage of the array values is the entered integer.
  This is how i create my Array:</p>
  
  <pre><code>public void fillVector ( ) 
      {
  
          int myarray[] = new int [10]; 
  
          for (int i = 0 ; i &lt; 10 ; i++) 
          { 
          myarray [i] = (int) (Math.random () * 10); 
          }
      }
  </code></pre>
  
  <p>Any sugestions how can i do to accomplish this ? </p>