• Post Reply Bookmark Topic Watch Topic
  • New Topic

Casting between char and Numeric Types  RSS feed

 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all

in a book i was reading, it said -> Character A's Unicode is \u0041.

when i use type conversion



output is 97 ...

QUESTION: what i am missing here ?

thanks for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Character A and character a are not the same.
 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes ..agreed

but it still wont print "\u0041" either for 'a' OR 'A'

thanks
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abid Ramay wrote:but it still wont print "\u0041" either for 'a' OR 'A'

What does it print out for 'A'?

Winston
 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
65
 
Henry Wong
author
Sheriff
Posts: 23282
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abid Ramay wrote:65



Hint: What is 65 as a hexadecimal number?
 
Abid Ramay
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok cool man. got it.

thanks a mill.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!