JAVA_QUIZES Telegram 141
Что выведет эта программа?

Ответ:
Программа напечатает “num1 == num2”. Если мы сравниваем две ссылки на объекты с помощью ==, значение всегда будет «false». Но в этом примере переменные num1 и num2 автоупаковываются (autoboxing) из-за Integer-кэширования. Вот почему num1 == num2 возвращает значение «true». Не забудьте, что Integer-кэширование актуально только для значений от -128 до 127.



tgoop.com/java_quizes/141
Create:
Last Update:

Что выведет эта программа?

Ответ:
Программа напечатает “num1 == num2”. Если мы сравниваем две ссылки на объекты с помощью ==, значение всегда будет «false». Но в этом примере переменные num1 и num2 автоупаковываются (autoboxing) из-за Integer-кэширования. Вот почему num1 == num2 возвращает значение «true». Не забудьте, что Integer-кэширование актуально только для значений от -128 до 127.

BY Java tests




Share with your friend now:
tgoop.com/java_quizes/141

View MORE
Open in Telegram


Telegram News

Date: |

In the “Bear Market Screaming Therapy Group” on Telegram, members are only allowed to post voice notes of themselves screaming. Anything else will result in an instant ban from the group, which currently has about 75 members. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content. Healing through screaming therapy Telegram has announced a number of measures aiming to tackle the spread of disinformation through its platform in Brazil. These features are part of an agreement between the platform and the country's authorities ahead of the elections in October. Telegram desktop app: In the upper left corner, click the Menu icon (the one with three lines). Select “New Channel” from the drop-down menu.
from us


Telegram Java tests
FROM American