Concepts of an Array
![](concep1.gif)
- Definitions:
- What is an array?
- What is an element of an array?
- What is an index of an element?
- 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 name. It will take
five Strings.
- Declare an array whose name is price. It will store
six floating numbers.
- If the size of an array is n, what will the last element's index?
- How do you store information in the array? (Write Java codes for the
questions below.)
- Store first 10 odd numbers in the odd array as the above picture.
- Take user's recommending 5 names and store them into the name array as the above picture.
- Initialize the first element of the price array as 2.4.
Also, install the rest of elements to be twice of the previous element.
- Use a "for" loop to print each of the above arrays.