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
Dew
Dew@dewanjal·
@EclipseJavaIDE Will work for it. Its caching that support -128 to 127. Use i1.equals(i2) for value comparision
English
0
0
2
0
Paylaş