title: Bad operand type for Binary operator "*"
body: <p>Bad operand type for Binary operator "*"</p>
  
  <p>I am getting the error during compilation as Bad operand type of Binary operator saying that: first type: int second type: int[] and i have to use this logic only. Following is a part of my program</p>
  
  <pre><code>public static int pmean(int[] ar){
      int[][] a = new int[ar.length][ar.length];
      int k=0;
      int min=0;
      int sum=0;
      for(int i=0;i&lt;ar.length;i++){
          k=i+1;
          for(int j=0;j&lt;ar.length;j++){
              a[i][j]= (k * a[j]);//error at this line
              k++;
              if(k==ar.length+1)
                  k=1;
          }
      }
  </code></pre>