Post

๐ŸŒ’ Eclipse IDE
๐ŸŒ’ Eclipse IDE@EclipseJavaIDEยท
What will be the output of this program? (don't cheat!)
๐ŸŒ’ Eclipse IDE tweet media
English
72
44
167
0
๐ŸŒ’ Eclipse IDE
๐ŸŒ’ Eclipse IDE@EclipseJavaIDEยท
As a follow up try with i1 = 3, i2 =3
English
3
0
8
0
๐ŸŒ’ Eclipse IDE
๐ŸŒ’ Eclipse IDE@EclipseJavaIDEยท
It has nothing to do with object reference vs value comparison. Would have been too easy ;)
English
1
1
4
0
๐ŸŒ’ Eclipse IDE
๐ŸŒ’ Eclipse IDE@EclipseJavaIDEยท
Answer is False because of the caching mechanism trick of Integer. Read through the answers of those who got it.
English
1
1
4
0
Tagir Valeev
Tagir Valeev@tagir_valeevยท
@EclipseJavaIDE Wrong, of course. The correct answer: according to the JLS 5.1.7 the result of this program is unspecified. #jls-5.1.7" target="_blank" rel="nofollow noopener">docs.oracle.com/javase/specs/jโ€ฆ
Tagir Valeev tweet media
English
0
0
2
0
๊ณต์œ