title: Java 2D arrays, unable to find a way to store double calculation as an element
body: <p>I'm having an issue with an assignment in <code>Java</code>. I'm using NetBeans.</p>
  <p>I'm trying to input some calculations into a 2D array so that when the user inputs a value it will automatically get stored and at the end print out the result. I'm getting an error and it wont let me do this and cant understand or find a way to fix this.</p>
  <p>I'm getting &quot;double cannot be converted to int&quot;, but I'm not actually wanting to convert to int, this makes me think that I cant store a double into an <code>array</code> with this code. Can you please suggest something?</p>
  <pre><code>    public static void main(String[] args) {
          
          Scanner leer = new Scanner(System.in);
          
          //prestamo interes del 18% al tiempo que se solicite
          
          double interes, numerador, denominador;
          int periodo = 0;
          double cuota[];
          double cantPrestamo[];
          
          periodo = periodo*12;
          interes = .18/12;
          
         
          String[]empleados = {&quot;Jose Rivera&quot;, &quot;Maria Zuniga&quot;, &quot;Francisco Sanchez&quot;};
          
          System.out.print(&quot;Introduzca el monto del prestamo: &quot;);
          cantPrestamo = leer.nextDouble();
          
          System.out.print(&quot;Introduzca la cantidad en meses: &quot;);
          periodo = leer.nextInt();
          
          numerador = interes * Math.pow(1 + interes, periodo);
          denominador = Math.pow(1 + interes, periodo)-1;
          cuota = cantPrestamo * (numerador / denominador);
          
          //System.out.printf(&quot;La cuota a pagar Lps.%.2f&quot;, cuota);
          //System.out.println();
          
          
         double[][] cuotaPeriodo;
         cuotaPeriodo = new double [cuota][cantPrestamo];
           
          
      }
      
  }
  </code></pre>