This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we print ascii value of null ?

 
vicky ma
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can we print ascii value of null ?
if yes , how ?

asper my knowledge its value is 0
 
pete stein
Bartender
Posts: 1561
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't exist as they are two unrelated concepts.
 
Rob Spoor
Sheriff
Pie
Posts: 20380
45
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In C and C++, NULL, 0 and '\0' are all the same. In Java, 0 and '\0' are the same but null is something completely different; it has no ASCII value because ASCII values are only available for chars. null is not a char.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47258
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I presume you mean to ask what the "null character" (as it is called in ASCII) looks like when you print it out. It doesn't look like anything. Try this
System.out.println((char)0);
And you won't see anything.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic