title: Java Multidimensional array passing as a object
body: <p>Its just a OOP test I was doing, could you please help me understanding the concept of how to set the Multidimensional array value by passing the object. Please check the below code;</p>
  
  <pre><code> public class agnts {
  
  
  
   private int rate[][] = new int [4][5];
  
   public agnts(){
   rate[0][1] = new pric(25);
   rate[1][1]=new pric(30);
   rate[2][1]= new pric(45);
   rate[3][1]=new pric(55);
   }    
   }
   class pric {
   //int pric [][]= new int [4][5];
   int pric;
  public pric(int p){
  
      this.pric=p;
  }
   public int getPric(){
      return pric;
  }
  }
   public static void main(String[] args) {        
  
    agnts tz=  new agnts();
    }
  </code></pre>
  
  <p>I get an error of type incompatible required:int found:pric 
  Am I doing something wrong? please advise.</p>