• Post Reply Bookmark Topic Watch Topic
  • New Topic

assigning  RSS feed

 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
c = '\u0042';

this statement assigns B to the variable c.

Can any one explain that?
Then what is the value of other alphabets?
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by James Tharakan:
c = '\u0042';

this statement assigns B to the variable c.

Can any one explain that?
Then what is the value of other alphabets?


using the '\u0042' notation say that "I want you to use the unicode character with the value of 42".

You can find all unicode tables at http://www.unicode.org/versions/Unicode5.1.0/ or http://www.unicode.org/charts/ if you want to look at the code-charts. Unicode is over 100.000 characters so you can express a lot.

If you use '\u03A9' you get the Greek Omega-sign.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this statement assigns B to the variable c.

Can any one explain that?

This is because the Unicode value of "B" is 42(hex).
Then what is the value of other alphabets?

Should be easy to guess, here is a complete list of latin characters .

Hope this helps
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ove beat me on that by a minute,
one more thing please make your subject a bit more meaningful. Read this for more information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!