All this is one question How do you declare an array? (Write Java codes for the questions below.) Declare an array whose name is odd . It also has 10 integer numbers. Declare an array whose name is...


All this is one question



  1. How do you declare an array? (Write Java codes for the questions below.)


    1. Declare an array whose name isodd. It also has10 integer numbers.


    2. Declare an array whose name isname. It will takefiveStrings.


    3. Declare an array whose name isprice. It will storesix floating numbers.



  2. If thesize of an array is n, what willthe last element's index?

  3. How do you store information in the array? (WriteJava codes for the questions below.)

    1. Store first 10 odd numbers in theodd array as the above picture.

    2. Take user's recommending 5 names and store them into thename array as the above picture.

    3. Initialize the first element of theprice array as 2.4. Also, install the rest of elements to be twice of the previous element.



  4. Use a "for" loop to print each of the above arrays.




Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here