This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default value for char?

 
Venkata Raaman
Ranch Hand
Posts: 46
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
\u0000 is not a whitespace. Check what it is in this Unicode Table.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic