Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: default value for char?
 
It's not a secret anymore!