• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

SCJP 6 : Chapter 3 - equals() vs ==

 
Greenhorn
Posts: 8
Netbeans IDE AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I am a junior java developer, and i am preparing the SCJP/OCPJP 6 certification with the k&b scjp 6 book.

In the page 246, the chapter 3, there is this bloc of code



When I excute this bloc of code, it is working 100%
But if I change it to this



The execution is different and the i3==i4 gives false
Why is this happening??
 
Rancher
Posts: 3742
16
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See the wrapper classes section of CachedObjects
 
Jason Adam Bourne
Greenhorn
Posts: 8
Netbeans IDE AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great resource!

Thank you so much !
 
reply
    Bookmark Topic Watch Topic
  • New Topic