問題文
A block declares a variable of a nested table type and immediately assigns a value to the first element, and the assignment fails at run time. Which description of what initialization means for collections is correct?
選択肢
- A nested table variable is initialized by the method that adds elements to it, so calling that method before the assignment is the way to bring the variable into existence.
- A nested table variable is initialized by the first assignment to any of its elements, so the index of the assignment has to be one that the collection already holds.
- A nested table variable does not exist until it is made empty by a constructor or given a value, and the method that adds elements cannot be used to bring such a variable into existence.
- A nested table variable exists as an empty collection from the moment it is declared, so the data type of the value has to be changed before the assignment will be accepted.