What is the default value of the elements of an array?

September 21st, 2007 by uCertify Leave a reply »

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:

Element Type Initial Value
boolean false
byte 0
short 0
int 0
long 0L
char ‘u0000′
float null
double 0.0D
Object reference null
  • Share/Bookmark
Advertisement

Leave a Reply

uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.