Return to Coding in Java with artEoz – exercises

Arrays

  1. The following java code declares, instanciates and a one-dimension array of integers:
  1. Run this code and display the memory diagram. What is the label assigned to the created object? key_48
  2. The instructions below are similar and create an array of objects.
    Make sure you have the geometrie resource. If necessary, see the Resources import webpage.
    What is the label assigned to the created object?key_48
  1. Select Array index option to display the index of the cells.
    What is the smallest value of the index? the greatest? key_48
  2. The clone, defined for all objects, is used to duplicate an array. Run the code below. What is actually duplicated? key_48
  1. Enter some instructions to copy the tab array including the duplication on the points. key_48
  2. The following statements create an two dimensions array of objects. What is the label assigned to the created object? key_48
  1. What is the statement to clear the first line of the array? key_48
  2. What is the representation of a 3 dimensions array? (With artEoz, take small values for the dimensions of the array not to blow up the calculation time of the memory diagram.

Back to java exercises list