Telegram Group & Telegram Channel
👀 Случайные целочисленные числа

Теперь более трудное задание. Не читайте решение. Посмотрите сможете ли вы найти
ответ самостоятельно. Когда я запущу следующую программу:

for (int i = 0; i < 10; i++) {
System.out.println((Integer) i);
}


Иногда я получаю следующий вывод:

92
221
45
48
236
183
39
193
33
84


➡️ Но как такое вообще возможно? Ответ в кроется в переопределении JDK кеша Integer через рефлексию, и затем в использовании auto-boxing и auto-unboxing.

Java Learning 👩‍💻
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/Java_per_month/3476
Create:
Last Update:

👀 Случайные целочисленные числа

Теперь более трудное задание. Не читайте решение. Посмотрите сможете ли вы найти
ответ самостоятельно. Когда я запущу следующую программу:

for (int i = 0; i < 10; i++) {
System.out.println((Integer) i);
}


Иногда я получаю следующий вывод:

92
221
45
48
236
183
39
193
33
84


➡️ Но как такое вообще возможно? Ответ в кроется в переопределении JDK кеша Integer через рефлексию, и затем в использовании auto-boxing и auto-unboxing.

Java Learning 👩‍💻

BY Java Learning




Share with your friend now:
tg-me.com/Java_per_month/3476

View MORE
Open in Telegram


Java Learning Telegram | DID YOU KNOW?

Date: |

Telegram is riding high, adding tens of million of users this year. Now the bill is coming due.Telegram is one of the few significant social-media challengers to Facebook Inc., FB -1.90% on a trajectory toward one billion users active each month by the end of 2022, up from roughly 550 million today.

Telegram today rolling out an update which brings with it several new features.The update also adds interactive emoji. When you send one of the select animated emoji in chat, you can now tap on it to initiate a full screen animation. The update also adds interactive emoji. When you send one of the select animated emoji in chat, you can now tap on it to initiate a full screen animation. This is then visible to you or anyone else who's also present in chat at the moment. The animations are also accompanied by vibrations. This is then visible to you or anyone else who's also present in chat at the moment. The animations are also accompanied by vibrations.

Java Learning from us


Telegram Java Learning
FROM USA