+ 6

Why do these two statements show different result?

Integer i1 = 127; Integer i2 = 127; // Statement 1 : true System.out.println(i1 == i2); i1 = 128; i2 = 128; // Statement 2 : false System.out.println(i1 == i2); https://code.sololearn.com/cqMfP6Czhd38/?ref=app

13th Jan 2020, 1:01 AM
Jobelle
Jobelle - avatar
1 Réponse