aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: char default value ?
 
Similar Threads
What is the correct answer?
assignment operator
'\u000' != " " true or false
clear the doubt please
char array