Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
Boolean comparison
geeta rai
Ranch Hand
Posts: 48
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Why would
if( new Boolean("true") == new Boolean("true"))
be false?
allison craig
Greenhorn
Posts: 17
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Geeta. The == operator checks to see if two objects are one of the same at the heap. The "new" operator was used for each operand thus creating two distinct objects. Using ".equals(..)" will result to true.
geeta rai
Ranch Hand
Posts: 48
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Oh! how could i miss that!!! I guess, i've studied
alot
and its time for me to sleep. Tomorrow is the BIG day :-)
allison craig
Greenhorn
Posts: 17
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Your exam is tomorrow? Good luck Geeta!
geeta rai
Ranch Hand
Posts: 48
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Allison
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
why(boolean b3=true;)(Boolean b4=true;)is both right?
Boxing - Boolean question
errata or ??
regarding Wrapper's unboxing
a doubt....
More...