File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes default value for char? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "default value for char?" Watch "default value for char?" New topic
Author

default value for char?

Venkata Raaman
Ranch Hand

Joined: Mar 26, 2010
Posts: 46

Hi I am trying to access default values in a class by creating instance and static as well.
default value for bool is false, int is 0, that way But when i use char it prints nothing just a whitespace.
here is the code

Is it supposed to be that way??\u0000 is the default value?what will it shows on screen?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

\u0000 is not a whitespace. Check what it is in this Unicode Table.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: default value for char?