Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

assigning

 
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic