Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Sub: Unicode & Equality

Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sub: Unicode & Equality
Hello Friends;

Can you explain me following:
In K.A.M, In Table 2.7 (p25) Unicode values are same for both ,char.litral �1�& integer litral 1
WHILE In 3.9(p59) Line:- boolean compare =�1�==1;//false
Why? . Thanks.
Ketan Patel

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Please read more carefully. At page 25 it is said that character 1 may be represented by '1' or unicode '\u0031'. At page 59 it is a comparison between primitive value 1 and character 1 !!! Character '1' is converted to an int before test (binary numeric promotion) which gives 0x31 or 49 decimal which of course is != 1 !!!
Mihai T.
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ketan,
This is in reply to your question on threads that you wanted.
There was a queston on deadlock. One on synchronization
one on threads which implement the runnable interface.
But most of them were jqplus questions.
There were two or three that were non jqplus questions also but I do not remember the context now.
Thanks for your wishes
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic