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
Tim Cooke
Ron McLeod
Jeanne Boyarsky
Paul Clapham
Sheriffs:
Liutauras Vilda
Henry Wong
Devaka Cooray
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Al Hobbs
Carey Brown
Bartenders:
Piet Souris
Mikalai Zaikin
Himai Minh
Forum:
Programmer Certification (OCPJP)
Wrapper
Naveed Ali
Ranch Hand
Posts: 41
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Why it prints false.?
if( new Boolean("true") == new Boolea("true"))
System.out.println("True");
else
System.out.println("False");
Barkat Mardhani
Ranch Hand
Posts: 787
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Because it creates two distinct Boolean objects both having value as true, and == checks for operands pointing to 'same' object not to 'similar' objects...
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
doubt in " =="
String Objects Confusion
how to solve expression ...
a doubt....
Q'tion from Majji's paper
More...