Hi all,
As far as i know about
java for all these years. The following rule applies for arrays:
If the elements in an array are not purposely initialized when the array is created, the array elements will be automatically initialized with default values. The default values are:
* All reference types: null
* Primitive numeric types: 0
* Primitive boolean type: false
* Primitive char type: the Unicode character with 16 zero-valued bits ('\u0000' (the NUL character)
I have to prove to my client (he is in automation field) that a primitive array is by default initialized with 0. Please tell me where in the java specification is this behavior guaranteed.
Thanks in advance,
Regards,
Abhinav