In practice can I assume that all int arrays in Java will start out filled with zeros? for all machines in which the JVM runs?
Is this true for all types? char? boolean? enums?
Where is this officially documented?
The textbooks I have say that int arrays are set to zero but they also recommend that one should write a for-loop to set all values to zero just “to be clearer”.
Java Language Specification is the right place to look for such information:
Default values themselves are given in section 4.12.5.