title: Can we assume default array values in Java? for example, assume that an int array is set to all zeros?
body: <p>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?</p>
  
  <p>Is this true for all types? char? boolean? enums?</p>
  
  <p>Where is this officially documented?</p>
  
  <p>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".</p>