What are the contents of array1 and array2 after the followi
     What are the contents of array1 and array2 after the following statements execute: int[] array1 = new double[5]; arrayl [0] = 67; arrayl [1] = 68; double [] array2 = arrayl; array2[0] = 69; array2[1] = 70; array2[2] = 71;![What are the contents of array1 and array2 after the following statements execute: int[] array1 = new double[5]; arrayl [0] = 67; arrayl [1] = 68; double [] ar  What are the contents of array1 and array2 after the following statements execute: int[] array1 = new double[5]; arrayl [0] = 67; arrayl [1] = 68; double [] ar](/WebImages/5/what-are-the-contents-of-array1-and-array2-after-the-followi-983190-1761504887-0.webp) 
  
  Solution
Above statements will result in error because in statement 1(int array1 = new double[5];) we are trying to convert double to integer which not allowed in java.
It will give the below error :
error : incompatible types : double[] cannot be converted to int[]
![What are the contents of array1 and array2 after the following statements execute: int[] array1 = new double[5]; arrayl [0] = 67; arrayl [1] = 68; double [] ar  What are the contents of array1 and array2 after the following statements execute: int[] array1 = new double[5]; arrayl [0] = 67; arrayl [1] = 68; double [] ar](/WebImages/5/what-are-the-contents-of-array1-and-array2-after-the-followi-983190-1761504887-0.webp)
