This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes char default value ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "char default value ?" Watch "char default value ?" New topic
Author

char default value ?

Aru
Ranch Hand

Joined: Jul 20, 2000
Posts: 112
Hi,
Can anyone tell ..what is the default value for char variables ?
1) After the declaration: what is the value of c[50]?
char[] c = new char[100];
a) 50
b) 49
c) '\u0000'
d) '\u0020'
e) " "
f) cannot be determined
g) always null until a value is assigned
Thx
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Aru,
The default value for char is '\u0000'.
Hope this helps.
Aru
Ranch Hand

Joined: Jul 20, 2000
Posts: 112
Thanks Stephanie.
 
Have you checked out Aspose?
 
subject: char default value ?
 
It's not a secret anymore!