This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confused with unicode

 
Simeon Shi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
why the code followed output the '?' character
**************************
char a = 823;
System.out.println(a);
**************************
but i tried another block of code;
System.out.println((int)'?');
the output is 63 which is the same as ASCII.
why?
3x in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably because the display you were looking at only supports ASCII and not a complete Unicode font set.
 
Simeon Shi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, that hit the point
thanks a ton!
Simeon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic