write two step Java program to create an Array variable of double type to store 10 elements
kkvermasisai:
hii
Answers
Answered by
1
package com.company;
public class Main {
public static void main(String[] args) {
double[] anArray;
anArray = new double[10];
for (int i = 0; i < anArray.length; i++) {
anArray[i] = i;
System.out.print(anArray[i] + " ");
}
System.out.println();
}
}
Similar questions