Day 33 | Daily Java interview question | #java #ocjp #scjp

preview_player
Показать описание
Java programming interview questions
Java interview questions
Java tutorial
learn Java
Java programming
#scjp #javaprogramming #javainterviewquestion #javatutorial #interview #learnjava #javaquestions #javascript #ocjp #java #javacertification
Рекомендации по теме
Комментарии
Автор

true false
The second result is false because, for integer values between -128 and 127, Java maintains an internal cache to improve memory efficiency. This means that when you create an Integer within this range, Java reuses the same instance instead of creating a new one.

claytoncastro_
Автор

both are objects, objects can compare with equals operator

blackt
Автор

I think here, x and y compare its object adress

blr