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 free practice test for master-ciw-enterprise-developer Master CIW Enterprise Developer exam.
- Download practice question and study guide for scbcd for exam.
- Download free practice test for SUN SCDJWS exam.
- Download free practice test for scja SCJA exam.
- Best exam simulation SUN scjp download free trial.
- Pass SUN scjp-5-0 - SCJP 5/6
- Download free practice test for scmad SCMAD exam.
- Best exam simulation SUN scwcd download free trial.
- Download free practice test for SUN SCJP 2 exam.
- Click here to get free CX310-019 SCJA exam practice questions.
- Click here to get free CX310-036 SCJP 1.4 Upgrade exam practice questions.
- Click here to get free CX310-055 Java 5.0 exam practice questions.
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.
