What data type can be saved in an array? Can we change the size of an array
Fantastic news! We've Found the answer you've been seeking!
Question:
- What data type can be saved in an array?
- Can we change the size of an array once it has been created? Why?
- If we have an array with 5 elements, and we try to add an element with the following statement: myArray[5] = 18, what will be the value of the fifth element in the array?
- If we want to create an object in an array, what data type we need to use?
- What is the default value for an array that has been initialized as a string array? Why?
- If we created an Employee list(array), and we want to create objects for these employees in an array that may contain additional information for each employee. What is the best way to create this data using arrays? What will be the first element value of the array? Explain, and code an example.
- In the videos, the presenter defines traversing an Array as:
- In how many ways you can traverse an array?
- What is most of the common mistakes that generate an IndexOutOfBoundException error? Give an example.
- In your own words describe the steps (algorithm) to find the Max and the Min value in an array. Provide the steps (Step 1:, Step2:, ....)
- What is the algorithm to calculate the average of an array that contains integer values, provide the steps (Step 1:, Step2:, ....)
- To copy an array what kind of for loop is needed? Why?
Related Book For
Posted Date: