As soon as an array is created using a new operator, its elements are automatically initialized to their default values. This automatic initialization of the elements depends on the data type of the array. The following table shows the initial value of the elements of an array:
| boolean | false |
| byte | 0 |
| short | 0 |
| int | 0 |
| long | 0L |
| char | ‘u0000′ |
| float | null |
| double | 0.0D |
| Object reference | null |
- Download practice question and study guide for master-ciw-enterprise-developer for exam.
- Click here to get free scbcd SCBCD exam practice questions.
- Become SUN SCDJWS certified.
- Click here to get free scja SCJA exam practice questions.
- Click here to get free scjp SCJP exam practice questions.
- Pass SCJP 5/6 in first attampt.
- Best exam simulation SUN scmad download free trial.
- Download practice question and study guide for scwcd for exam.
- Best exam simulation SUN 310-035 download free trial.
- Pass SCJA in first attampt.
- Download free practice test for SUN SCJP 1.4 Upgrade exam.
- Get certified in first attempt download CX310-055 - Java 5.0 simulation.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.