title: type mismatch: can't convert from double to int java
body: <pre><code>public static void main(String[] args) {
  try{
      BufferedReader br=new BufferedReader(new FileReader("file.txt"));
  
      String[] pole=br.readLine().split(" ");
      double L=Double.parseDouble(pole[0]);
      double N=Double.parseDouble(pole[1]);
      String[] weight=new String[N];
      double[] scale=new double[N];
      double[] place=new double[N];
      for(int i=0; i&lt;N; i++){
          weight[i]=br.readLine();
          String[] variable=weight[i].split(" ");
          double variable1=Double.parseDouble(variable[0]);
          double variable2=Double.parseDouble(variable[1]);
          scale[i]=variable2;
          place[i]=variable1*variable2;               
      }
  </code></pre>
  
  <p>I have this java code. I Want to get the number from the file and convert them into double, but it gives me that error: type mismatch: can't convert from double to int. How can I fix this?</p>