Arrays
12. Several Arrays per Program
Answer:
double[] dvals = { 0.0, 0.5, 1.5, 2.0, 2.5 };
Several Arrays per Program
class ArrayEg4 { public static void main ( String[] args ) { int[] valA = { 12, 23, 45, 56 }; int[] valB = new int[4]; = ; = ; = ; = ; } } |
Question 12:
Fill in the blanks so that the values in valA
are copied into the corresponding cells of valB
.