Java Create Array 15 Doubles Assign Array Order Choice Using Loop Print Array Elements Fo Q37040430

JAVA

Create array of 15 doubles and assign them to the array (in anyorder – your choice).

Using a for loop, print out your array elements with thefollowing label:

ArrayName element at index[0] = 13.01

where ArrayName is your array name and 13.01 is the valueassigned to the array at index[0]. Make sure you are using the loopcontrol variable to print the index number in your for loop.


Solution


public class PrintArray { public static void main(String[] args) { double[] numbers = {13.01, 2.93, 3.45, 4, 5, 1, 3, 2, 7, 0, 2, 1,

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.