aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes what is default value for char array? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "what is default value for char array? " Watch "what is default value for char array? " New topic
Author

what is default value for char array?

weiliu lili
Ranch Hand

Joined: Apr 11, 2002
Posts: 46
what is default value for char array? if i print out on the screen , the output is nothing,why?
Kasey Tritt
Greenhorn

Joined: May 02, 2002
Posts: 15
Default value for char array is '\u0000'.
Kasey Tritt
Greenhorn

Joined: May 02, 2002
Posts: 15
Oh, I believe '\u0000' is 'non-printable', just like those special ASCII characters.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
According to AsciiTable.com, it's the [b]null[/i] character. How would you display such character? Displaying nothing sounds good to me.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9033
    
  10
'\u0000' is the null character. It displays nothing. It does not print to the display; it does not print to the printer.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is default value for char array?
 
Similar Threads
char default value ?
Doubt in char array and byte array
'\u000' != " " true or false
about null
clear the doubt please